/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
D | TestDateTimeValueRange.java | 70 import java.time.temporal.ValueRange; 87 assertImmutable(ValueRange.class); in test_immutable() 94 ValueRange test = ValueRange.of(1, 12); in test_of_longlong() 104 ValueRange test = ValueRange.of(1, 123456789012345L); in test_of_longlong_big() 115 ValueRange.of(12, 1); in test_of_longlong_minGtMax() 122 ValueRange test = ValueRange.of(1, 28, 31); in test_of_longlonglong() 133 ValueRange.of(12, 1, 2); in test_of_longlonglong_minGtMax() 138 ValueRange.of(1, 31, 28); in test_of_longlonglong_smallestmaxminGtMax() 161 ValueRange test = ValueRange.of(sMin, lMin, sMax, lMax); in test_of_longlonglonglong() 186 ValueRange.of(sMin, lMin, sMax, lMax); in test_of_longlonglonglong_invalid() [all …]
|
D | MockFieldNoValue.java | 70 import java.time.temporal.ValueRange; 90 public ValueRange range() { in range() 91 return ValueRange.of(1, 20); in range() 111 public ValueRange rangeRefinedBy(TemporalAccessor temporal) { in rangeRefinedBy() 112 return ValueRange.of(1, 20); in rangeRefinedBy()
|
D | TestIsoWeekFields.java | 39 import java.time.temporal.ValueRange; 86 assertEquals(weekField.range(), ValueRange.of(1, 52, 53)); in test_WOWBY_range() 91 assertEquals(weekField.rangeRefinedBy(LocalDate.of(2012, 12, 31)), ValueRange.of(1, 52)); in test_WOWBY_rangeRefinedBy() 92 assertEquals(weekField.rangeRefinedBy(LocalDate.of(2013, 12, 29)), ValueRange.of(1, 52)); in test_WOWBY_rangeRefinedBy() 93 assertEquals(weekField.rangeRefinedBy(LocalDate.of(2013, 12, 30)), ValueRange.of(1, 52)); in test_WOWBY_rangeRefinedBy() 94 assertEquals(weekField.rangeRefinedBy(LocalDate.of(2014, 12, 28)), ValueRange.of(1, 52)); in test_WOWBY_rangeRefinedBy() 95 assertEquals(weekField.rangeRefinedBy(LocalDate.of(2014, 12, 29)), ValueRange.of(1, 53)); in test_WOWBY_rangeRefinedBy() 96 assertEquals(weekField.rangeRefinedBy(LocalDate.of(2016, 1, 3)), ValueRange.of(1, 53)); in test_WOWBY_rangeRefinedBy() 97 assertEquals(weekField.rangeRefinedBy(LocalDate.of(2016, 1, 4)), ValueRange.of(1, 52)); in test_WOWBY_rangeRefinedBy() 126 assertEquals(yearField.range(), ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE)); in test_WBY_range() [all …]
|
D | MockFieldValue.java | 66 import java.time.temporal.ValueRange; 87 public ValueRange range(TemporalField field) { in range()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | ChronoField.java | 122 NANO_OF_SECOND("NanoOfSecond", NANOS, SECONDS, ValueRange.of(0, 999_999_999)), 138 NANO_OF_DAY("NanoOfDay", NANOS, DAYS, ValueRange.of(0, 86400L * 1000_000_000L - 1)), 158 MICRO_OF_SECOND("MicroOfSecond", MICROS, SECONDS, ValueRange.of(0, 999_999)), 177 MICRO_OF_DAY("MicroOfDay", MICROS, DAYS, ValueRange.of(0, 86400L * 1000_000L - 1)), 197 MILLI_OF_SECOND("MilliOfSecond", MILLIS, SECONDS, ValueRange.of(0, 999)), 216 MILLI_OF_DAY("MilliOfDay", MILLIS, DAYS, ValueRange.of(0, 86400L * 1000L - 1)), 226 SECOND_OF_MINUTE("SecondOfMinute", SECONDS, MINUTES, ValueRange.of(0, 59), "second"), 238 SECOND_OF_DAY("SecondOfDay", SECONDS, DAYS, ValueRange.of(0, 86400L - 1)), 248 MINUTE_OF_HOUR("MinuteOfHour", MINUTES, HOURS, ValueRange.of(0, 59), "minute"), 259 MINUTE_OF_DAY("MinuteOfDay", MINUTES, DAYS, ValueRange.of(0, (24 * 60) - 1)), [all …]
|
D | ValueRange.java | 90 public final class ValueRange implements Serializable { class 125 public static ValueRange of(long min, long max) { in of() 129 return new ValueRange(min, min, max, max); in of() 146 public static ValueRange of(long min, long maxSmallest, long maxLargest) { in of() 165 …public static ValueRange of(long minSmallest, long minLargest, long maxSmallest, long maxLargest) { in of() 175 return new ValueRange(minSmallest, minLargest, maxSmallest, maxLargest); in of() 186 private ValueRange(long minSmallest, long minLargest, long maxSmallest, long maxLargest) { in ValueRange() method in ValueRange 386 if (obj instanceof ValueRange) { in equals() 387 ValueRange other = (ValueRange) obj; in equals()
|
D | IsoFields.java | 300 public ValueRange range() { in range() 301 return ValueRange.of(1, 90, 92); in range() 309 public ValueRange rangeRefinedBy(TemporalAccessor temporal) { in rangeRefinedBy() 316 … return (IsoChronology.INSTANCE.isLeapYear(year) ? ValueRange.of(1, 91) : ValueRange.of(1, 90)); in rangeRefinedBy() 318 return ValueRange.of(1, 91); in rangeRefinedBy() 320 return ValueRange.of(1, 92); in rangeRefinedBy() 389 public ValueRange range() { in range() 390 return ValueRange.of(1, 4); in range() 438 public ValueRange range() { in range() 439 return ValueRange.of(1, 52, 53); in range() [all …]
|
D | WeekFields.java | 742 private final ValueRange range; 744 …String name, WeekFields weekDef, TemporalUnit baseUnit, TemporalUnit rangeUnit, ValueRange range) { in ComputedDayOfField() 752 private static final ValueRange DAY_OF_WEEK_RANGE = ValueRange.of(1, 7); 753 private static final ValueRange WEEK_OF_MONTH_RANGE = ValueRange.of(0, 1, 4, 6); 754 private static final ValueRange WEEK_OF_YEAR_RANGE = ValueRange.of(0, 1, 52, 54); 755 private static final ValueRange WEEK_OF_WEEK_BASED_YEAR_RANGE = ValueRange.of(1, 52, 53); 817 ValueRange dayRange = temporal.range(DAY_OF_YEAR); in localizedWeekBasedYear() 850 ValueRange dayRange = temporal.range(DAY_OF_YEAR); in localizedWeekOfWeekBasedYear() 1065 public ValueRange range() { in range() 1089 public ValueRange rangeRefinedBy(TemporalAccessor temporal) { in rangeRefinedBy() [all …]
|
D | JulianFields.java | 224 private final transient ValueRange range; 231 this.range = ValueRange.of(-365243219162L + offset, 365241780471L + offset); in Field() 257 public ValueRange range() { in range() 268 public ValueRange rangeRefinedBy(TemporalAccessor temporal) { in rangeRefinedBy()
|
D | TemporalField.java | 150 ValueRange range(); in range() 234 ValueRange rangeRefinedBy(TemporalAccessor temporal); in rangeRefinedBy()
|
D | TemporalAccessor.java | 169 default ValueRange range(TemporalField field) { in range() 218 ValueRange range = range(field); in get()
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | CopticChronology.java | 66 import java.time.temporal.ValueRange; 110 static final ValueRange MOY_RANGE = ValueRange.of(1, 13); 114 static final ValueRange DOM_RANGE = ValueRange.of(1, 5, 30); 118 static final ValueRange DOM_RANGE_NONLEAP = ValueRange.of(1, 5); 122 static final ValueRange DOM_RANGE_LEAP = ValueRange.of(1, 6); 231 public ValueRange range(ChronoField field) { in range() 233 case DAY_OF_MONTH: return ValueRange.of(1, 5, 30); in range() 234 case ALIGNED_WEEK_OF_MONTH: return ValueRange.of(1, 1, 5); in range() 235 case MONTH_OF_YEAR: return ValueRange.of(1, 13); in range() 236 case PROLEPTIC_MONTH: return ValueRange.of(-1000, 1000); // TODO in range() [all …]
|
D | CopticDate.java | 78 import java.time.temporal.ValueRange; 150 ValueRange range; in CopticDate() 191 public ValueRange range(TemporalField field) { in range() 196 case DAY_OF_MONTH: return ValueRange.of(1, lengthOfMonth()); in range() 197 case DAY_OF_YEAR: return ValueRange.of(1, lengthOfYear()); in range() 198 case ALIGNED_WEEK_OF_MONTH: return ValueRange.of(1, month == 13 ? 1 : 5); in range() 201 … ValueRange.of(1, Year.MAX_VALUE + 1) : ValueRange.of(1, Year.MAX_VALUE)); // TODO in range()
|
D | TCKIsoEra.java | 66 import java.time.temporal.ValueRange; 112 assertEquals(era.range(ERA), ValueRange.of(0, 1)); in test_range()
|
D | TCKThaiBuddhistEra.java | 66 import java.time.temporal.ValueRange; 116 assertEquals(era.range(ERA), ValueRange.of(0, 1)); in test_range()
|
D | TCKHijrahEra.java | 66 import java.time.temporal.ValueRange; 113 assertEquals(era.range(ERA), ValueRange.of(1, 1)); in test_range()
|
D | TCKMinguoEra.java | 67 import java.time.temporal.ValueRange; 117 assertEquals(era.range(ERA), ValueRange.of(0, 1)); in test_range()
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/ |
D | TCKValueRangeSerialization.java | 71 import java.time.temporal.ValueRange; 88 ValueRange range = ValueRange.of(1, 2, 3, 4); in test_serialization() 115 ValueRange range = ValueRange.of(10, 20, 30, 40); in test_valueRangeSerialized() 150 fail("Invalid minSmallest > minLargest " + ValueRange.class.getName()); in test_invalid_serialform() 161 fail("Invalid maxSmallest > maxLargest " + ValueRange.class.getName()); in test_invalid_serialform() 172 fail("Invalid minLagest > maxLargest " + ValueRange.class.getName()); in test_invalid_serialform()
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | ThaiBuddhistChronologyTest.java | 24 import java.time.temporal.ValueRange; 42 ValueRange expected; in test_range() 46 expected = ValueRange.of( in test_range() 53 expected = ValueRange in test_range() 59 expected = ValueRange.of(ChronoField.YEAR.range().getMinimum() + YEARS_AHEAD, in test_range() 107 assertEquals(ValueRange.of(1, ChronoField.YEAR.range().getMaximum() + YEARS_AHEAD), in test_ThaiBuddhistDate_range_yeaOfEra() 109 assertEquals(ValueRange.of(1, -ChronoField.YEAR.range().getMinimum() + 1 - YEARS_AHEAD), in test_ThaiBuddhistDate_range_yeaOfEra()
|
D | MinguoChronologyTest.java | 26 import java.time.temporal.ValueRange; 44 ValueRange expected; in test_range() 48 expected = ValueRange.of( in test_range() 55 … expected = ValueRange.of(1, ChronoField.YEAR.range().getMaximum() - YEARS_BEHIND, in test_range() 60 expected = ValueRange.of(ChronoField.YEAR.range().getMinimum() - YEARS_BEHIND, in test_range() 107 assertEquals(ValueRange.of(1, ChronoField.YEAR.range().getMaximum() - YEARS_BEHIND), in test_MinguoDate_range_yeaOfEra() 109 assertEquals(ValueRange.of(1, -ChronoField.YEAR.range().getMinimum() + 1 + YEARS_BEHIND), in test_MinguoDate_range_yeaOfEra()
|
D | EraTest.java | 36 import java.time.temporal.ValueRange; 94 public ValueRange range() { in range() 114 public ValueRange rangeRefinedBy(TemporalAccessor temporal) { in rangeRefinedBy()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | MinguoChronology.java | 74 import java.time.temporal.ValueRange; 314 public ValueRange range(ChronoField field) { in range() 317 ValueRange range = PROLEPTIC_MONTH.range(); in range() 318 …return ValueRange.of(range.getMinimum() - YEARS_DIFFERENCE * 12L, range.getMaximum() - YEARS_DIFFE… in range() 321 ValueRange range = YEAR.range(); in range() 322 …return ValueRange.of(1, range.getMaximum() - YEARS_DIFFERENCE, -range.getMinimum() + 1 + YEARS_DIF… in range() 325 ValueRange range = YEAR.range(); in range() 326 …return ValueRange.of(range.getMinimum() - YEARS_DIFFERENCE, range.getMaximum() - YEARS_DIFFERENCE); in range()
|
D | ThaiBuddhistChronology.java | 74 import java.time.temporal.ValueRange; 350 public ValueRange range(ChronoField field) { in range() 353 ValueRange range = PROLEPTIC_MONTH.range(); in range() 354 …return ValueRange.of(range.getMinimum() + YEARS_DIFFERENCE * 12L, range.getMaximum() + YEARS_DIFFE… in range() 357 ValueRange range = YEAR.range(); in range() 358 …return ValueRange.of(1, -(range.getMinimum() + YEARS_DIFFERENCE) + 1, range.getMaximum() + YEARS_D… in range() 361 ValueRange range = YEAR.range(); in range() 362 …return ValueRange.of(range.getMinimum() + YEARS_DIFFERENCE, range.getMaximum() + YEARS_DIFFERENCE); in range()
|
D | HijrahEra.java | 70 import java.time.temporal.ValueRange; 151 public ValueRange range(TemporalField field) { in range() 153 return ValueRange.of(1, 1); in range()
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
D | TCKChronoField.java | 108 import java.time.temporal.ValueRange; 252 assertEquals(MONTH_OF_YEAR.range(), ValueRange.of(1, 12)); in test_range() 253 assertEquals(MONTH_OF_YEAR.rangeRefinedBy(LocalDate.of(2000, 2, 29)), ValueRange.of(1, 12)); in test_range() 255 assertEquals(DAY_OF_MONTH.range(), ValueRange.of(1, 28, 31)); in test_range() 256 assertEquals(DAY_OF_MONTH.rangeRefinedBy(LocalDate.of(2000, 2, 29)), ValueRange.of(1, 29)); in test_range()
|