Home
last modified time | relevance | path

Searched refs:addExact (Results 1 – 24 of 24) sorted by relevance

/libcore/ojluni/src/main/java/java/time/
DPeriod.java337 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()
DDuration.java241 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()
DInstant.java322 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()
DClock.java567 return Math.addExact(baseClock.millis(), offset.toMillis()); in millis()
DLocalDate.java1239 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
1344 long mjDay = Math.addExact(toEpochDay(), daysToAdd); in plusDays()
DYear.java709 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
DYearMonth.java807 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
DLocalDateTime.java1721 return Math.addExact(amount, timePart); in until()
/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java737 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()
DMath.java822 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/
DChronoPeriodImpl.java180 Math.addExact(years, amount.years), in plus()
181 Math.addExact(months, amount.months), in plus()
182 Math.addExact(days, amount.days)); in plus()
DChronoLocalDateImpl.java209 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
DChronoLocalDateTimeImpl.java387 return Math.addExact(amount, time.until(end.toLocalTime(), unit)); in until()
DHijrahDate.java524 int newYear = Math.addExact(this.prolepticYear, (int)years); in plusYears()
/libcore/luni/src/test/java/libcore/java/lang/
DStrictMathTest.java46 assertEquals(expected, StrictMath.addExact(a, b)); in testAddExactI()
99 assertEquals(expected, BigInteger.valueOf(StrictMath.addExact(a, b))); in testAddExactL()
DMathTest.java49 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/
DExactArithTests.java102 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/
DParsed.java390 … 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/
DCopticDate.java286 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/
DExactArithTests.java78 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/
DWeekFields.java963 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()
DIsoFields.java694 Math.addExact(temporal.get(WEEK_BASED_YEAR), amount)); in addTo()
/libcore/ojluni/src/main/java/java/util/
DGregorianCalendar.java3461 cal.setTimeInMillis(Math.addExact(Math.multiplyExact(zdt.toEpochSecond(), 1000), in from()
/libcore/api/
Dcurrent.txt3287 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);