/libcore/ojluni/src/main/java/java/time/ |
D | Period.java | 337 days = Math.addExact(days, Math.multiplyExact(weeks, 7)); in parse() 622 Math.addExact(years, isoAmount.years), in plus() 623 Math.addExact(months, isoAmount.months), in plus() 624 Math.addExact(days, isoAmount.days)); in plus() 644 return create(Math.toIntExact(Math.addExact(years, yearsToAdd)), months, days); in plusYears() 664 return create(years, Math.toIntExact(Math.addExact(months, monthsToAdd)), days); in plusMonths() 684 return create(years, months, Math.toIntExact(Math.addExact(days, daysToAdd))); in plusDays()
|
D | Duration.java | 241 long secs = Math.addExact(seconds, Math.floorDiv(nanoAdjustment, NANOS_PER_SECOND)); in ofSeconds() 438 …long seconds = Math.addExact(daysAsSecs, Math.addExact(hoursAsSecs, Math.addExact(minsAsSecs, secs… in create() 811 long epochSec = Math.addExact(seconds, secondsToAdd); in plus() 812 epochSec = Math.addExact(epochSec, nanosToAdd / NANOS_PER_SECOND); in plus() 1200 millis = Math.addExact(millis, nanos / 1000_000); in toMillis() 1215 totalNanos = Math.addExact(totalNanos, nanos); in toNanos()
|
D | Instant.java | 322 long secs = Math.addExact(epochSecond, Math.floorDiv(nanoAdjustment, NANOS_PER_SECOND)); in ofEpochSecond() 919 long epochSec = Math.addExact(seconds, secondsToAdd); in plus() 920 epochSec = Math.addExact(epochSec, nanosToAdd / NANOS_PER_SECOND); in plus() 1159 return Math.addExact(totalNanos, end.nanos - nanos); in nanosUntil() 1229 return Math.addExact(millis, adjustment); in toEpochMilli() 1232 return Math.addExact(millis, nanos / 1000_000); in toEpochMilli()
|
D | Clock.java | 567 return Math.addExact(baseClock.millis(), offset.toMillis()); in millis()
|
D | LocalDate.java | 1239 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus() 1344 long mjDay = Math.addExact(toEpochDay(), daysToAdd); in plusDays()
|
D | Year.java | 709 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
|
D | YearMonth.java | 807 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
|
D | LocalDateTime.java | 1721 return Math.addExact(amount, timePart); in until()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StrictMath.java | 737 public static int addExact(int x, int y) { in addExact() method in StrictMath 738 return Math.addExact(x, y); in addExact() 752 public static long addExact(long x, long y) { in addExact() method in StrictMath 753 return Math.addExact(x, y); in addExact()
|
D | Math.java | 822 public static int addExact(int x, int y) { in addExact() method in Math 841 public static long addExact(long x, long y) { in addExact() method in Math
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | ChronoPeriodImpl.java | 180 Math.addExact(years, amount.years), in plus() 181 Math.addExact(months, amount.months), in plus() 182 Math.addExact(days, amount.days)); in plus()
|
D | ChronoLocalDateImpl.java | 209 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
|
D | ChronoLocalDateTimeImpl.java | 387 return Math.addExact(amount, time.until(end.toLocalTime(), unit)); in until()
|
D | HijrahDate.java | 524 int newYear = Math.addExact(this.prolepticYear, (int)years); in plusYears()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StrictMathTest.java | 46 assertEquals(expected, StrictMath.addExact(a, b)); in testAddExactI() 99 assertEquals(expected, BigInteger.valueOf(StrictMath.addExact(a, b))); in testAddExactL()
|
D | MathTest.java | 49 assertEquals(expected, Math.addExact(a, b)); in testAddExactI() 138 assertEquals(expected, BigInteger.valueOf(Math.addExact(a, b))); in testAddExactL()
|
/libcore/ojluni/src/test/java/lang/StrictMath/ |
D | ExactArithTests.java | 102 int sum = StrictMath.addExact(x, y); in testIntegerExact() 209 long sum = StrictMath.addExact(x, y); in testLongExact()
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | Parsed.java | 390 … updateCheckConflict(AMPM_OF_DAY, HOUR_OF_DAY, Math.addExact(Math.multiplyExact(ap, 12), hap)); in resolveTimeFields() 539 totalNanos = Math.addExact(totalNanos, Math.multiplyExact(moh, 60_000_000_000L)); in resolveTime() 540 totalNanos = Math.addExact(totalNanos, Math.multiplyExact(som, 1_000_000_000L)); in resolveTime() 541 totalNanos = Math.addExact(totalNanos, nos); in resolveTime()
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | CopticDate.java | 286 long calcEm = Math.addExact(curEm, months); in plusMonths() 296 return CopticDate.ofEpochDay(Math.addExact(toEpochDay(), days)); in plusDays()
|
/libcore/ojluni/src/test/java/lang/Math/ |
D | ExactArithTests.java | 78 int sum = Math.addExact(x, y); in testIntegerExact() 234 long sum = Math.addExact(x, y); in testLongExact()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | WeekFields.java | 963 date = date.plus(Math.addExact(Math.multiplyExact(weeks, 7), days), DAYS); in resolveWoM() 988 date = date.plus(Math.addExact(Math.multiplyExact(weeks, 7), days), DAYS); in resolveWoY()
|
D | IsoFields.java | 694 Math.addExact(temporal.get(WEEK_BASED_YEAR), amount)); in addTo()
|
/libcore/ojluni/src/main/java/java/util/ |
D | GregorianCalendar.java | 3461 cal.setTimeInMillis(Math.addExact(Math.multiplyExact(zdt.toEpochSecond(), 1000), in from()
|
/libcore/api/ |
D | current.txt | 3287 method public static int addExact(int, int); 3288 method public static long addExact(long, long); 3672 method public static int addExact(int, int); 3673 method public static long addExact(long, long);
|