Home
last modified time | relevance | path

Searched refs:amountToAdd (Results 1 – 25 of 28) sorted by relevance

12

/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDateImpl.java199 public D plus(long amountToAdd, TemporalUnit unit) { in plus() argument
202 case DAYS: return plusDays(amountToAdd); in plus()
203 case WEEKS: return plusDays(Math.multiplyExact(amountToAdd, 7)); in plus()
204 case MONTHS: return plusMonths(amountToAdd); in plus()
205 case YEARS: return plusYears(amountToAdd); in plus()
206 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus()
207 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus()
208 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus()
209 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
213 return (D) ChronoLocalDate.super.plus(amountToAdd, unit); in plus()
DChronoLocalDateTimeImpl.java300 public ChronoLocalDateTimeImpl<D> plus(long amountToAdd, TemporalUnit unit) { in plus() argument
303 case NANOS: return plusNanos(amountToAdd); in plus()
304 …case MICROS: return plusDays(amountToAdd / MICROS_PER_DAY).plusNanos((amountToAdd % MICROS_PER_DAY… in plus()
305 …case MILLIS: return plusDays(amountToAdd / MILLIS_PER_DAY).plusNanos((amountToAdd % MILLIS_PER_DAY… in plus()
306 case SECONDS: return plusSeconds(amountToAdd); in plus()
307 case MINUTES: return plusMinutes(amountToAdd); in plus()
308 case HOURS: return plusHours(amountToAdd); in plus()
309 …case HALF_DAYS: return plusDays(amountToAdd / 256).plusHours((amountToAdd % 256) * 12); // no ove… in plus()
311 return with(date.plus(amountToAdd, unit), time); in plus()
313 … return ChronoLocalDateTimeImpl.ensureValid(date.getChronology(), unit.addTo(this, amountToAdd)); in plus()
DThaiBuddhistDate.java386 public ThaiBuddhistDate plus(long amountToAdd, TemporalUnit unit) { in plus() argument
387 return super.plus(amountToAdd, unit); in plus()
391 public ThaiBuddhistDate minus(long amountToAdd, TemporalUnit unit) { in minus() argument
392 return super.minus(amountToAdd, unit); in minus()
DMinguoDate.java386 public MinguoDate plus(long amountToAdd, TemporalUnit unit) { in plus() argument
387 return super.plus(amountToAdd, unit); in plus()
391 public MinguoDate minus(long amountToAdd, TemporalUnit unit) { in minus() argument
392 return super.minus(amountToAdd, unit); in minus()
DChronoZonedDateTimeImpl.java301 public ChronoZonedDateTime<D> plus(long amountToAdd, TemporalUnit unit) { in plus() argument
303 return with(dateTime.plus(amountToAdd, unit)); in plus()
305 …return ChronoZonedDateTimeImpl.ensureValid(getChronology(), unit.addTo(this, amountToAdd)); /// … in plus()
DJapaneseDate.java627 public JapaneseDate plus(long amountToAdd, TemporalUnit unit) { in plus() argument
628 return super.plus(amountToAdd, unit); in plus()
632 public JapaneseDate minus(long amountToAdd, TemporalUnit unit) { in minus() argument
633 return super.minus(amountToAdd, unit); in minus()
DChronoLocalDate.java461 default ChronoLocalDate plus(long amountToAdd, TemporalUnit unit) { in plus() argument
465 return ChronoLocalDateImpl.ensureValid(getChronology(), unit.addTo(this, amountToAdd)); in plus()
DChronoPeriod.java209 ChronoPeriod plus(TemporalAmount amountToAdd); in plus() argument
DChronoPeriodImpl.java175 public ChronoPeriod plus(TemporalAmount amountToAdd) { in plus() argument
176 ChronoPeriodImpl amount = validateAmount(amountToAdd); in plus()
DHijrahDate.java551 public HijrahDate plus(long amountToAdd, TemporalUnit unit) { in plus() argument
552 return super.plus(amountToAdd, unit); in plus()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DCopticDate.java260 public CopticDate plus(long amountToAdd, TemporalUnit unit) { in plus() argument
264 case DAYS: return plusDays(amountToAdd); in plus()
265 case WEEKS: return plusDays(Math.multiplyExact(amountToAdd, 7)); in plus()
266 case MONTHS: return plusMonths(amountToAdd); in plus()
267 case YEARS: return plusYears(amountToAdd); in plus()
268 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus()
269 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus()
270 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus()
274 return unit.addTo(this, amountToAdd); in plus()
/libcore/ojluni/src/main/java/java/time/
DInstant.java780 public Instant plus(TemporalAmount amountToAdd) { in plus() argument
781 return (Instant) amountToAdd.addTo(this); in plus()
843 public Instant plus(long amountToAdd, TemporalUnit unit) { in plus() argument
846 case NANOS: return plusNanos(amountToAdd); in plus()
847 case MICROS: return plus(amountToAdd / 1000_000, (amountToAdd % 1000_000) * 1000); in plus()
848 case MILLIS: return plusMillis(amountToAdd); in plus()
849 case SECONDS: return plusSeconds(amountToAdd); in plus()
850 … case MINUTES: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_MINUTE)); in plus()
851 case HOURS: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_HOUR)); in plus()
852 … case HALF_DAYS: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY / 2)); in plus()
[all …]
DLocalDateTime.java1136 public LocalDateTime plus(TemporalAmount amountToAdd) { in plus() argument
1137 if (amountToAdd instanceof Period periodToAdd) { in plus()
1140 Objects.requireNonNull(amountToAdd, "amountToAdd"); in plus()
1141 return (LocalDateTime) amountToAdd.addTo(this); in plus()
1171 public LocalDateTime plus(long amountToAdd, TemporalUnit unit) { in plus() argument
1174 case NANOS: return plusNanos(amountToAdd); in plus()
1175 …case MICROS: return plusDays(amountToAdd / MICROS_PER_DAY).plusNanos((amountToAdd % MICROS_PER_DAY… in plus()
1176 …case MILLIS: return plusDays(amountToAdd / MILLIS_PER_DAY).plusNanos((amountToAdd % MILLIS_PER_DAY… in plus()
1177 case SECONDS: return plusSeconds(amountToAdd); in plus()
1178 case MINUTES: return plusMinutes(amountToAdd); in plus()
[all …]
DYear.java649 public Year plus(TemporalAmount amountToAdd) { in plus() argument
650 return (Year) amountToAdd.addTo(this); in plus()
702 public Year plus(long amountToAdd, TemporalUnit unit) { in plus() argument
705 case YEARS: return plusYears(amountToAdd); in plus()
706 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus()
707 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus()
708 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus()
709 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
713 return unit.addTo(this, amountToAdd); in plus()
DYearMonth.java743 public YearMonth plus(TemporalAmount amountToAdd) { in plus() argument
744 return (YearMonth) amountToAdd.addTo(this); in plus()
799 public YearMonth plus(long amountToAdd, TemporalUnit unit) { in plus() argument
802 case MONTHS: return plusMonths(amountToAdd); in plus()
803 case YEARS: return plusYears(amountToAdd); in plus()
804 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus()
805 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus()
806 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus()
807 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
811 return unit.addTo(this, amountToAdd); in plus()
DDuration.java692 public Duration plus(long amountToAdd, TemporalUnit unit) { in plus() argument
695 return plus(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY), 0); in plus()
700 if (amountToAdd == 0) { in plus()
705 case NANOS: return plusNanos(amountToAdd); in plus()
706 …case MICROS: return plusSeconds((amountToAdd / (1000_000L * 1000)) * 1000).plusNanos((amountToAdd in plus()
707 case MILLIS: return plusMillis(amountToAdd); in plus()
708 case SECONDS: return plusSeconds(amountToAdd); in plus()
710 return plusSeconds(Math.multiplyExact(unit.getDuration().seconds, amountToAdd)); in plus()
712 Duration duration = unit.getDuration().multipliedBy(amountToAdd); in plus()
DLocalTime.java1004 public LocalTime plus(TemporalAmount amountToAdd) { in plus() argument
1005 return (LocalTime) amountToAdd.addTo(this); in plus()
1061 public LocalTime plus(long amountToAdd, TemporalUnit unit) { in plus() argument
1064 case NANOS: return plusNanos(amountToAdd); in plus()
1065 case MICROS: return plusNanos((amountToAdd % MICROS_PER_DAY) * 1000); in plus()
1066 case MILLIS: return plusNanos((amountToAdd % MILLIS_PER_DAY) * 1000_000); in plus()
1067 case SECONDS: return plusSeconds(amountToAdd); in plus()
1068 case MINUTES: return plusMinutes(amountToAdd); in plus()
1069 case HOURS: return plusHours(amountToAdd); in plus()
1070 case HALF_DAYS: return plusHours((amountToAdd % 2) * 12); in plus()
[all …]
DLocalDate.java1165 public LocalDate plus(TemporalAmount amountToAdd) { in plus() argument
1166 if (amountToAdd instanceof Period periodToAdd) { in plus()
1169 Objects.requireNonNull(amountToAdd, "amountToAdd"); in plus()
1170 return (LocalDate) amountToAdd.addTo(this); in plus()
1255 public LocalDate plus(long amountToAdd, TemporalUnit unit) { in plus() argument
1258 case DAYS: return plusDays(amountToAdd); in plus()
1259 case WEEKS: return plusWeeks(amountToAdd); in plus()
1260 case MONTHS: return plusMonths(amountToAdd); in plus()
1261 case YEARS: return plusYears(amountToAdd); in plus()
1262 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus()
[all …]
DZonedDateTime.java1545 public ZonedDateTime plus(TemporalAmount amountToAdd) { in plus() argument
1546 if (amountToAdd instanceof Period periodToAdd) { in plus()
1549 Objects.requireNonNull(amountToAdd, "amountToAdd"); in plus()
1550 return (ZonedDateTime) amountToAdd.addTo(this); in plus()
1591 public ZonedDateTime plus(long amountToAdd, TemporalUnit unit) { in plus() argument
1594 return resolveLocal(dateTime.plus(amountToAdd, unit)); in plus()
1596 return resolveInstant(dateTime.plus(amountToAdd, unit)); in plus()
1599 return unit.addTo(this, amountToAdd); in plus()
DOffsetTime.java843 public OffsetTime plus(TemporalAmount amountToAdd) { in plus() argument
844 return (OffsetTime) amountToAdd.addTo(this); in plus()
873 public OffsetTime plus(long amountToAdd, TemporalUnit unit) { in plus() argument
875 return with(time.plus(amountToAdd, unit), offset); in plus()
877 return unit.addTo(this, amountToAdd); in plus()
DOffsetDateTime.java1152 public OffsetDateTime plus(TemporalAmount amountToAdd) { in plus() argument
1153 return (OffsetDateTime) amountToAdd.addTo(this); in plus()
1182 public OffsetDateTime plus(long amountToAdd, TemporalUnit unit) { in plus() argument
1184 return with(dateTime.plus(amountToAdd, unit), offset); in plus()
1186 return unit.addTo(this, amountToAdd); in plus()
DPeriod.java621 public Period plus(TemporalAmount amountToAdd) { in plus() argument
622 Period isoAmount = Period.from(amountToAdd); in plus()
/libcore/ojluni/src/main/java/java/time/temporal/
DTemporal.java297 Temporal plus(long amountToAdd, TemporalUnit unit); in plus() argument
/libcore/luni/src/test/java/libcore/java/time/chrono/
DChronoZonedDateTimeTest.java134 public ChronoZonedDateTime plus(long amountToAdd, TemporalUnit unit) { in plus() argument
/libcore/ojluni/annotations/hiddenapi/java/time/
DOffsetDateTime.java273 public java.time.OffsetDateTime plus(java.time.temporal.TemporalAmount amountToAdd) { in plus() argument
277 public java.time.OffsetDateTime plus(long amountToAdd, java.time.temporal.TemporalUnit unit) { in plus() argument

12