Home
last modified time | relevance | path

Searched refs:TemporalUnit (Results 1 – 25 of 53) sorted by relevance

123

/libcore/ojluni/src/test/java/time/test/java/time/
DMockSimplePeriod.java69 import java.time.temporal.TemporalUnit;
95 private final TemporalUnit unit;
107 public static MockSimplePeriod of(long amount, TemporalUnit unit) { in of()
111 private MockSimplePeriod(long amount, TemporalUnit unit) { in MockSimplePeriod()
121 public long get(TemporalUnit unit) { in get()
126 public List<TemporalUnit> getUnits() { in getUnits()
135 public TemporalUnit getUnit() { in getUnit()
/libcore/ojluni/src/main/java/java/time/temporal/
DTemporal.java152 boolean isSupported(TemporalUnit unit); in isSupported()
297 Temporal plus(long amountToAdd, TemporalUnit unit); in plus()
369 default Temporal minus(long amountToSubtract, TemporalUnit unit) { in minus()
447 long until(Temporal endExclusive, TemporalUnit unit); in until()
DJulianFields.java222 private final transient TemporalUnit baseUnit;
223 private final transient TemporalUnit rangeUnit;
227 private Field(String name, TemporalUnit baseUnit, TemporalUnit rangeUnit, long offset) { in Field()
237 public TemporalUnit getBaseUnit() { in getBaseUnit()
242 public TemporalUnit getRangeUnit() { in getRangeUnit()
DTemporalAmount.java117 long get(TemporalUnit unit); in get()
134 List<TemporalUnit> getUnits(); in getUnits()
DChronoField.java593 private final TemporalUnit baseUnit;
594 private final TemporalUnit rangeUnit;
598 …private ChronoField(String name, TemporalUnit baseUnit, TemporalUnit rangeUnit, ValueRange range) { in ChronoField()
606 private ChronoField(String name, TemporalUnit baseUnit, TemporalUnit rangeUnit, in ChronoField()
658 public TemporalUnit getBaseUnit() { in getBaseUnit()
663 public TemporalUnit getRangeUnit() { in getRangeUnit()
DTemporalField.java121 TemporalUnit getBaseUnit(); in getBaseUnit()
135 TemporalUnit getRangeUnit(); in getRangeUnit()
DIsoFields.java268 public static final TemporalUnit WEEK_BASED_YEARS = Unit.WEEK_BASED_YEARS;
276 public static final TemporalUnit QUARTER_YEARS = Unit.QUARTER_YEARS;
292 public TemporalUnit getBaseUnit() { in getBaseUnit()
296 public TemporalUnit getRangeUnit() { in getRangeUnit()
381 public TemporalUnit getBaseUnit() { in getBaseUnit()
385 public TemporalUnit getRangeUnit() { in getRangeUnit()
430 public TemporalUnit getBaseUnit() { in getBaseUnit()
434 public TemporalUnit getRangeUnit() { in getRangeUnit()
511 public TemporalUnit getBaseUnit() { in getBaseUnit()
515 public TemporalUnit getRangeUnit() { in getRangeUnit()
[all …]
DTemporalQueries.java243 public static TemporalQuery<TemporalUnit> precision() { in precision()
356 static final TemporalQuery<TemporalUnit> PRECISION = (temporal) ->
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoPeriod.java68 import java.time.temporal.TemporalUnit;
137 long get(TemporalUnit unit); in get()
153 List<TemporalUnit> getUnits(); in getUnits()
173 for (TemporalUnit unit : getUnits()) { in isZero()
187 for (TemporalUnit unit : getUnits()) { in isNegative()
DChronoLocalDate.java82 import java.time.temporal.TemporalUnit;
409 default boolean isSupported(TemporalUnit unit) { in isSupported()
458 default ChronoLocalDate plus(long amountToAdd, TemporalUnit unit) { in plus()
482 default ChronoLocalDate minus(long amountToSubtract, TemporalUnit unit) { in minus()
598 long until(Temporal endExclusive, TemporalUnit unit); in until()
DChronoLocalDateTime.java85 import java.time.temporal.TemporalUnit;
250 default boolean isSupported(TemporalUnit unit) { in isSupported()
293 ChronoLocalDateTime<D> plus(long amountToAdd, TemporalUnit unit); in plus()
311 default ChronoLocalDateTime<D> minus(long amountToSubtract, TemporalUnit unit) { in minus()
DChronoPeriodImpl.java77 import java.time.temporal.TemporalUnit;
108 private static final List<TemporalUnit> SUPPORTED_UNITS =
109 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS));
141 public long get(TemporalUnit unit) { in get()
154 public List<TemporalUnit> getUnits() { in getUnits()
DChronoLocalDateImpl.java72 import java.time.temporal.TemporalUnit;
198 public D plus(long amountToAdd, TemporalUnit unit) { in plus()
224 public D minus(long amountToSubtract, TemporalUnit unit) { in minus()
376 public long until(Temporal endExclusive, TemporalUnit unit) { in until()
DChronoZonedDateTime.java85 import java.time.temporal.TemporalUnit;
397 default boolean isSupported(TemporalUnit unit) { in isSupported()
440 ChronoZonedDateTime<D> plus(long amountToAdd, TemporalUnit unit); in plus()
458 default ChronoZonedDateTime<D> minus(long amountToSubtract, TemporalUnit unit) { in minus()
/libcore/luni/src/test/java/libcore/java/time/chrono/
DChronoZonedDateTimeTest.java34 import java.time.temporal.TemporalUnit;
48 assertFalse(chronoZonedDateTime.isSupported((TemporalUnit) null)); in isSupported_returnsFalse_forNull()
54 TemporalUnit temporalUnit = mock(TemporalUnit.class); in isSupported_defersToArgument()
110 public ChronoZonedDateTime plus(long amountToAdd, TemporalUnit unit) { in plus()
115 public long until(Temporal endExclusive, TemporalUnit unit) { in until()
DEraTest.java34 import java.time.temporal.TemporalUnit;
84 public TemporalUnit getBaseUnit() { in getBaseUnit()
89 public TemporalUnit getRangeUnit() { in getRangeUnit()
/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DMockFieldNoValue.java69 import java.time.temporal.TemporalUnit;
80 public TemporalUnit getBaseUnit() { in getBaseUnit()
85 public TemporalUnit getRangeUnit() { in getRangeUnit()
/libcore/ojluni/annotations/hiddenapi/java/time/
DDuration.java105 public static java.time.Duration of(long amount, java.time.temporal.TemporalUnit unit) { in of()
149 public long get(java.time.temporal.TemporalUnit unit) { in get()
153 public java.util.List<java.time.temporal.TemporalUnit> getUnits() { in getUnits()
185 public java.time.Duration plus(long amountToAdd, java.time.temporal.TemporalUnit unit) { in plus()
221 public java.time.Duration minus(long amountToSubtract, java.time.temporal.TemporalUnit unit) { in minus()
373 static final java.util.List<java.time.temporal.TemporalUnit> UNITS;
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoLocalDate.java84 import java.time.temporal.TemporalUnit;
189 TemporalUnit adjuster = new FixedTemporalUnit(date2); in test_badPlusTemporalUnitChrono()
213 TemporalUnit adjuster = new FixedTemporalUnit(date2); in test_badMinusTemporalUnitChrono()
361 public long get(TemporalUnit unit) { in get()
366 public List<TemporalUnit> getUnits() { in getUnits()
375 static class FixedTemporalUnit implements TemporalUnit {
435 public TemporalUnit getBaseUnit() { in getBaseUnit()
440 public TemporalUnit getRangeUnit() { in getRangeUnit()
DTCKChronoLocalDateTime.java85 import java.time.temporal.TemporalUnit;
192 TemporalUnit adjuster = new FixedTemporalUnit(cdt2); in test_badPlusTemporalUnitChrono()
216 TemporalUnit adjuster = new FixedTemporalUnit(cdt2); in test_badMinusTemporalUnitChrono()
381 public long get(TemporalUnit unit) { in get()
386 public List<TemporalUnit> getUnits() { in getUnits()
396 static class FixedTemporalUnit implements TemporalUnit {
456 public TemporalUnit getBaseUnit() { in getBaseUnit()
461 public TemporalUnit getRangeUnit() { in getRangeUnit()
/libcore/luni/src/test/java/libcore/java/time/
DInstantTest.java21 import java.time.temporal.TemporalUnit;
35 assertEquals(false, Instant.EPOCH.isSupported((TemporalUnit) null)); in test_isSupported_TemporalUnit()
DOffsetTimeTest.java22 import java.time.temporal.TemporalUnit;
70 private static void assertPlusIsNoop(long amount, TemporalUnit unit) { in assertPlusIsNoop()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKPeriod.java76 import java.time.temporal.TemporalUnit;
168 public long get(TemporalUnit unit) { in factory_from_TemporalAmount_YearsDays()
176 public List<TemporalUnit> getUnits() { in factory_from_TemporalAmount_YearsDays()
177 List<TemporalUnit> list = new ArrayList<>(); in factory_from_TemporalAmount_YearsDays()
198 public long get(TemporalUnit unit) { in factory_from_TemporalAmount_Years_tooBig()
202 public List<TemporalUnit> getUnits() { in factory_from_TemporalAmount_Years_tooBig()
203 return Collections.<TemporalUnit>singletonList(YEARS); in factory_from_TemporalAmount_Years_tooBig()
221 public long get(TemporalUnit unit) { in factory_from_TemporalAmount_DaysHours()
229 public List<TemporalUnit> getUnits() { in factory_from_TemporalAmount_DaysHours()
230 List<TemporalUnit> list = new ArrayList<>(); in factory_from_TemporalAmount_DaysHours()
[all …]
/libcore/ojluni/src/main/java/java/time/
DDuration.java89 import java.time.temporal.TemporalUnit;
303 public static Duration of(long amount, TemporalUnit unit) { in of()
331 for (TemporalUnit unit : amount.getUnits()) { in from()
527 public long get(TemporalUnit unit) { in get()
550 public List<TemporalUnit> getUnits() { in getUnits()
560 static final List<TemporalUnit> UNITS =
561 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(SECONDS, NANOS));
691 public Duration plus(long amountToAdd, TemporalUnit unit) { in plus()
852 public Duration minus(long amountToSubtract, TemporalUnit unit) { in minus()
1343 public Duration truncatedTo(TemporalUnit unit) { in truncatedTo()
DPeriod.java84 import java.time.temporal.TemporalUnit;
149 private static final List<TemporalUnit> SUPPORTED_UNITS =
150 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS));
267 for (TemporalUnit unit : amount.getUnits()) { in from()
426 public long get(TemporalUnit unit) { in get()
451 public List<TemporalUnit> getUnits() { in getUnits()

123