class Duration implements Cloneable, Serializable, Comparable<Duration>, JAXBable<JAXBDuration> {

    public static Class<? extends Duration> fromChronoUnit(ChronoUnit unit)
    {
        Class<? extends Duration> duration;
        switch (unit)
        {
            case YEARS:
                duration = Years.class;
                break;
            case MONTHS:
                duration = Months.class;
                break;
            case WEEKS:
                duration = Weeks.class;
                break;
            case DAYS:
                duration = Days.class;
                break;
            case HOURS:
                duration = Hours.class;
                break;
            case MINUTES:
                duration = Minutes.class;
                break;
            case SECONDS:
                duration = Seconds.class;
                break;
            case MILLIS:
                duration = Milliseconds.class;
                break;
            case MICROS:
                duration = Microseconds.class;
                break;
            case NANOS:
                duration = Nanoseconds.class;
                break;
            default:
                duration = null;
                break;
        }
        return duration;
    }

    public  Duration(BigDecimal magnitude);
    protected  Duration(long unscaledMagnitude, int scale);

}