/libcore/ojluni/src/main/java/java/time/ |
D | Duration.java | 704 case NANOS: return plusNanos(amountToAdd); in plus() 705 …e MICROS: return plusSeconds((amountToAdd / (1000_000L * 1000)) * 1000).plusNanos((amountToAdd % (… in plus() 712 return plusSeconds(duration.getSeconds()).plusNanos(duration.getNano()); in plus() 793 public Duration plusNanos(long nanosToAdd) { in plusNanos() method in Duration 939 …return (nanosToSubtract == Long.MIN_VALUE ? plusNanos(Long.MAX_VALUE).plusNanos(1) : plusNanos(-na… in minusNanos() 1360 return plusNanos(result - nod); in truncatedTo()
|
D | Instant.java | 756 return plusNanos(result - nod); in truncatedTo() 847 case NANOS: return plusNanos(amountToAdd); in plus() 900 public Instant plusNanos(long nanosToAdd) { in plusNanos() method in Instant 1023 return plusNanos(Long.MAX_VALUE).plusNanos(1); in minusNanos() 1025 return plusNanos(-nanosToSubtract); in minusNanos()
|
D | OffsetDateTime.java | 1324 public OffsetDateTime plusNanos(long nanos) { in plusNanos() method in OffsetDateTime 1325 return with(dateTime.plusNanos(nanos), offset); in plusNanos() 1514 … return (nanos == Long.MIN_VALUE ? plusNanos(Long.MAX_VALUE).plusNanos(1) : plusNanos(-nanos)); in minusNanos()
|
D | LocalTime.java | 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() 1160 public LocalTime plusNanos(long nanosToAdd) { in plusNanos() method in LocalTime 1284 return plusNanos(-(nanosToSubtract % NANOS_PER_DAY)); in minusNanos()
|
D | LocalDateTime.java | 1180 case NANOS: return plusNanos(amountToAdd); in plus() 1181 …case MICROS: return plusDays(amountToAdd / MICROS_PER_DAY).plusNanos((amountToAdd % MICROS_PER_DAY… in plus() 1182 …case MILLIS: return plusDays(amountToAdd / MILLIS_PER_DAY).plusNanos((amountToAdd % MILLIS_PER_DAY… in plus() 1333 public LocalDateTime plusNanos(long nanos) { in plusNanos() method in LocalDateTime
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestDuration.java | 121 assertSame(t.plusNanos(0), t); in plusNanos_zeroReturnsThis() 127 assertSame(t.plusNanos(998000000), Duration.ZERO); in plusNanos_zeroSingleton()
|
D | TestLocalDateTime.java | 332 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(0); in test_plusNanos_noChange() 338 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L); in test_plusNanos_noChange_oneDay_same() 344 …Time t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 59, 59, 999999999)).plusNanos(1); in test_plusNanos_toMidnight() 350 …Time t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 59, 59, 999999999)).plusNanos(1); in test_plusNanos_toMidday()
|
D | TestOffsetDateTime.java | 258 OffsetDateTime test = base.plusNanos(0); in test_plusNanos_zero()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | ChronoLocalDateTimeImpl.java | 308 case NANOS: return plusNanos(amountToAdd); in plus() 309 …case MICROS: return plusDays(amountToAdd / MICROS_PER_DAY).plusNanos((amountToAdd % MICROS_PER_DAY… in plus() 310 …case MILLIS: return plusDays(amountToAdd / MILLIS_PER_DAY).plusNanos((amountToAdd % MILLIS_PER_DAY… in plus() 337 private ChronoLocalDateTimeImpl<D> plusNanos(long nanos) { in plusNanos() method in ChronoLocalDateTimeImpl
|
/libcore/luni/src/test/java/libcore/java/time/ |
D | DurationTest.java | 75 { Instant.EPOCH, Duration.between(Instant.EPOCH, Instant.MAX).plusNanos(1) }, in test_addTo_exceeds() 102 { Instant.EPOCH, Duration.between(Instant.MIN, Instant.EPOCH).plusNanos(1) }, in test_subtractFrom_exceeds()
|
/libcore/ojluni/annotations/hiddenapi/java/time/ |
D | Duration.java | 209 public java.time.Duration plusNanos(long nanosToAdd) { in plusNanos() method in Duration
|
D | OffsetDateTime.java | 309 public java.time.OffsetDateTime plusNanos(long nanos) { in plusNanos() method in OffsetDateTime
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKLocalTime.java | 1746 t = t.plusNanos(500000000); in test_plusNanos_halfABillion() 1817 LocalTime t = base.plusNanos(nanoseconds); 1827 LocalTime t = TEST_12_30_40_987654321.plusNanos(0); 1833 LocalTime t = TEST_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L); 1839 LocalTime t = LocalTime.of(23, 59, 59, 999999999).plusNanos(1); 1845 LocalTime t = LocalTime.of(11, 59, 59, 999999999).plusNanos(1); 2481 t = t.plusNanos(1); 2495 t = t.plusNanos(1);
|
D | TCKInstant.java | 208 Instant expected = Instant.ofEpochSecond(i).plusNanos(123456789L); 218 Instant expected = Instant.ofEpochSecond(i).plusNanos(123456789L); 1195 t = t.plusNanos(amount); 1203 t.plusNanos(1); 1209 t.plusNanos(-1);
|
D | TCKOffsetDateTime.java | 260 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); 277 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); 293 LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L); 295 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); 1028 OffsetDateTime test = base.plusNanos(1);
|
D | TCKZonedDateTime.java | 277 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); 296 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); 306 LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L); 308 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); 1815 assertEquals(base.plusNanos(amount * 3600_000_000_000L), expected); 1822 ZonedDateTime test = base.plusNanos(1); 1823 assertEquals(test, ZonedDateTime.of(ldt.plusNanos(1), ZONE_0100));
|
D | TCKLocalDateTime.java | 309 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); 325 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); 340 LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L); 342 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); 1974 t = t.plusNanos(500000000); 2050 LocalDateTime t = base.plusNanos(nanoseconds); 2061 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L);
|
D | TCKOffsetTime.java | 967 OffsetTime test = base.plusNanos(1); 974 OffsetTime test = base.plusNanos(0);
|
/libcore/ojluni/src/test/java/time/tck/java/time/zone/ |
D | TCKZoneRules.java | 456 assertEquals(test.previousTransition(prev.getInstant().plusNanos(1)), prev); in test_London_previousTransition_historic() 467 assertEquals(test.previousTransition(last.getInstant().plusNanos(1)), last); in test_London_previousTransition_rulesBased() 482 assertEquals(test.previousTransition(b.getInstant().plusNanos(1)), b); in test_London_previousTransition_rulesBased() 486 assertEquals(test.previousTransition(a.getInstant().plusNanos(1)), a); in test_London_previousTransition_rulesBased()
|