Searched refs:toIntExact (Results 1 – 13 of 13) sorted by relevance
/libcore/ojluni/src/main/java/java/time/ |
D | Period.java | 270 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()
|
D | LocalDate.java | 1670 return Period.of(Math.toIntExact(years), months, days); in until()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StrictMath.java | 812 public static int toIntExact(long value) { in toIntExact() method in StrictMath 813 return Math.toIntExact(value); in toIntExact()
|
D | Math.java | 1014 public static int toIntExact(long value) { in toIntExact() method in Math
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StrictMathTest.java | 131 assertEquals((int) a, StrictMath.toIntExact(a)); in testToIntExactL() 132 assertEquals(a, StrictMath.toIntExact(a)); // Is not exact, should throw AE. in testToIntExactL()
|
D | MathTest.java | 203 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/ |
D | CopticDate.java | 287 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/ |
D | ChronoPeriodImpl.java | 237 return new ChronoPeriodImpl(chrono, Math.toIntExact(splitYears), splitMonths, days); in normalized()
|
D | HijrahDate.java | 602 return getChronology().period(Math.toIntExact(years), months, days); in until()
|
D | AbstractChronology.java | 521 yoe = Math.toIntExact(yoeLong); in resolveYearOfEra()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | WeekFields.java | 918 … final int newValue = Math.toIntExact(value); // broad limit makes overflow checking lighter in resolve()
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DateTimeFormatterBuilder.java | 3344 int totalSecs = Math.toIntExact(offsetSecs); in format() 3487 int totalSecs = Math.toIntExact(offsetSecs); in format()
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKLocalDate.java | 1877 int years = Math.toIntExact((long) Year.MAX_VALUE - (long) Year.MIN_VALUE);
|