Home
last modified time | relevance | path

Searched refs:ValueRange (Results 1 – 25 of 68) sorted by relevance

123

/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DTestDateTimeValueRange.java70 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 …]
DMockFieldNoValue.java70 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()
DTestIsoWeekFields.java39 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 …]
DMockFieldValue.java66 import java.time.temporal.ValueRange;
87 public ValueRange range(TemporalField field) { in range()
/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java122 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 …]
DValueRange.java90 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()
DIsoFields.java300 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 …]
DWeekFields.java743 private final ValueRange range;
745 …String name, WeekFields weekDef, TemporalUnit baseUnit, TemporalUnit rangeUnit, ValueRange range) { in ComputedDayOfField()
753 private static final ValueRange DAY_OF_WEEK_RANGE = ValueRange.of(1, 7);
754 private static final ValueRange WEEK_OF_MONTH_RANGE = ValueRange.of(0, 1, 4, 6);
755 private static final ValueRange WEEK_OF_YEAR_RANGE = ValueRange.of(0, 1, 52, 54);
756 private static final ValueRange WEEK_OF_WEEK_BASED_YEAR_RANGE = ValueRange.of(1, 52, 53);
818 ValueRange dayRange = temporal.range(DAY_OF_YEAR); in localizedWeekBasedYear()
851 ValueRange dayRange = temporal.range(DAY_OF_YEAR); in localizedWeekOfWeekBasedYear()
1066 public ValueRange range() { in range()
1090 public ValueRange rangeRefinedBy(TemporalAccessor temporal) { in rangeRefinedBy()
[all …]
DJulianFields.java224 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()
DTemporalField.java150 ValueRange range(); in range()
234 ValueRange rangeRefinedBy(TemporalAccessor temporal); in rangeRefinedBy()
DTemporalAccessor.java169 default ValueRange range(TemporalField field) { in range()
218 ValueRange range = range(field); in get()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DCopticChronology.java66 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 …]
DCopticDate.java78 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()
201ValueRange.of(1, Year.MAX_VALUE + 1) : ValueRange.of(1, Year.MAX_VALUE)); // TODO in range()
DTCKThaiBuddhistEra.java66 import java.time.temporal.ValueRange;
116 assertEquals(era.range(ERA), ValueRange.of(0, 1)); in test_range()
DTCKIsoEra.java66 import java.time.temporal.ValueRange;
112 assertEquals(era.range(ERA), ValueRange.of(0, 1)); in test_range()
DTCKMinguoEra.java67 import java.time.temporal.ValueRange;
117 assertEquals(era.range(ERA), ValueRange.of(0, 1)); in test_range()
DTCKHijrahEra.java66 import java.time.temporal.ValueRange;
113 assertEquals(era.range(ERA), ValueRange.of(1, 1)); in test_range()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/
DTCKValueRangeSerialization.java71 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/
DThaiBuddhistChronologyTest.java24 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()
DMinguoChronologyTest.java24 import java.time.temporal.ValueRange;
42 ValueRange expected; in test_range()
46 expected = ValueRange.of( in test_range()
53 … expected = ValueRange.of(1, ChronoField.YEAR.range().getMaximum() - YEARS_BEHIND, in test_range()
58 expected = ValueRange.of(ChronoField.YEAR.range().getMinimum() - YEARS_BEHIND, in test_range()
105 assertEquals(ValueRange.of(1, ChronoField.YEAR.range().getMaximum() - YEARS_BEHIND), in test_MinguoDate_range_yeaOfEra()
107 assertEquals(ValueRange.of(1, -ChronoField.YEAR.range().getMinimum() + 1 + YEARS_BEHIND), in test_MinguoDate_range_yeaOfEra()
/libcore/ojluni/src/main/java/java/time/chrono/
DMinguoChronology.java74 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()
DThaiBuddhistChronology.java74 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()
DHijrahEra.java70 import java.time.temporal.ValueRange;
151 public ValueRange range(TemporalField field) { in range()
153 return ValueRange.of(1, 1); in range()
DJapaneseChronology.java83 import java.time.temporal.ValueRange;
400 public ValueRange range(ChronoField field) { in range()
411 return ValueRange.of(1, jcal.getGreatestMinimum(Calendar.YEAR), in range()
419 … return ValueRange.of(jcal.getMinimum(fieldIndex), jcal.getGreatestMinimum(fieldIndex), in range()
423 return ValueRange.of(JapaneseDate.MEIJI_6_ISODATE.getYear(), Year.MAX_VALUE); in range()
425 return ValueRange.of(JapaneseEra.MEIJI.getValue(), getCurrentEra().getValue()); in range()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKChronoField.java108 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()

123