@Test public void testCreateDuration() { doCreateDurationTest(0, 0, 0, 0); doCreateDurationTest(1, 2, 5, 4); doCreateDurationTest(-1, -2, -3, -14); doCreateDurationTest(0, -2, 3, 0); }
public static Duration createDuration(int years, int months, int weeks, int days) { return new Duration(years, months, weeks, days); }
DurationFactory { public static Duration createDuration(int years, int months, int weeks, int days) { return new Duration(years, months, weeks, days); } }
DurationFactory { public static Duration createDuration(int years, int months, int weeks, int days) { return new Duration(years, months, weeks, days); } DurationFactory(); }
DurationFactory { public static Duration createDuration(int years, int months, int weeks, int days) { return new Duration(years, months, weeks, days); } DurationFactory(); static Duration createDuration(int years, int months, int weeks, int days); static Duration createDays(int days); static Duration createWeeks(int weeks); static Duration createMonths(int months); static Duration createYears(int years); static Duration getDAY(); static Duration getWEEK(); static Duration getMONTH(); static Duration getYEAR(); }
DurationFactory { public static Duration createDuration(int years, int months, int weeks, int days) { return new Duration(years, months, weeks, days); } DurationFactory(); static Duration createDuration(int years, int months, int weeks, int days); static Duration createDays(int days); static Duration createWeeks(int weeks); static Duration createMonths(int months); static Duration createYears(int years); static Duration getDAY(); static Duration getWEEK(); static Duration getMONTH(); static Duration getYEAR(); static final Duration DAY; static final Duration WEEK; static final Duration MONTH; static final Duration YEAR; }