Home
last modified time | relevance | path

Searched refs:toIntExact (Results 1 – 13 of 13) sorted by relevance

/libcore/ojluni/src/main/java/java/time/
DPeriod.java270 years = Math.toIntExact(unitAmount); in from()
272 months = Math.toIntExact(unitAmount); in from()
274 days = Math.toIntExact(unitAmount); in from()
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()
834 return create(Math.toIntExact(splitYears), splitMonths, days); in normalized()
DLocalDate.java1670 return Period.of(Math.toIntExact(years), months, days); in until()
/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java812 public static int toIntExact(long value) { in toIntExact() method in StrictMath
813 return Math.toIntExact(value); in toIntExact()
DMath.java1014 public static int toIntExact(long value) { in toIntExact() method in Math
/libcore/luni/src/test/java/libcore/java/lang/
DStrictMathTest.java131 assertEquals((int) a, StrictMath.toIntExact(a)); in testToIntExactL()
132 assertEquals(a, StrictMath.toIntExact(a)); // Is not exact, should throw AE. in testToIntExactL()
DMathTest.java203 assertEquals((int) a, Math.toIntExact(a)); in testToIntExactL()
204 assertEquals(a, Math.toIntExact(a)); // Is not exact, should throw AE. in testToIntExactL()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DCopticDate.java287 int newYear = Math.toIntExact(Math.floorDiv(calcEm, 13)); in plusMonths()
324 return Period.of(Math.toIntExact(years), months, days); in until()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoPeriodImpl.java237 return new ChronoPeriodImpl(chrono, Math.toIntExact(splitYears), splitMonths, days); in normalized()
DHijrahDate.java602 return getChronology().period(Math.toIntExact(years), months, days); in until()
DAbstractChronology.java521 yoe = Math.toIntExact(yoeLong); in resolveYearOfEra()
/libcore/ojluni/src/main/java/java/time/temporal/
DWeekFields.java918 … final int newValue = Math.toIntExact(value); // broad limit makes overflow checking lighter in resolve()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatterBuilder.java3344 int totalSecs = Math.toIntExact(offsetSecs); in format()
3487 int totalSecs = Math.toIntExact(offsetSecs); in format()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKLocalDate.java1877 int years = Math.toIntExact((long) Year.MAX_VALUE - (long) Year.MIN_VALUE);