Home
last modified time | relevance | path

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

/libcore/ojluni/src/main/java/java/time/
DPeriod.java268 years = Math.toIntExact(unitAmount); in from()
270 months = Math.toIntExact(unitAmount); in from()
272 days = Math.toIntExact(unitAmount); in from()
646 return create(Math.toIntExact(Math.addExact(years, yearsToAdd)), months, days); in plusYears()
666 return create(years, Math.toIntExact(Math.addExact(months, monthsToAdd)), days); in plusMonths()
686 return create(years, months, Math.toIntExact(Math.addExact(days, daysToAdd))); in plusDays()
836 return create(Math.toIntExact(splitYears), splitMonths, days); in normalized()
DLocalDate.java1712 return Period.of(Math.toIntExact(years), months, days); in until()
/libcore/ojluni/src/test/java/lang/Math/
DClamp.java71 int min = Math.toIntExact(test[1]); in testIntClamp()
72 int max = Math.toIntExact(test[2]); in testIntClamp()
73 int expected = Math.toIntExact(test[3]); in testIntClamp()
79 int min = Math.toIntExact(test[1]); in testIntClamp()
80 int max = Math.toIntExact(test[2]); in testIntClamp()
DExactArithTests.java520 int value = Math.toIntExact(x); in testLongExact()
/libcore/metrictests/memory/apps/src/libcore/heapdumper/
DPssInstrumentation.java43 int totalPssKb = Math.toIntExact(Debug.getPss()); in takeMeasurement()
/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.java288 int newYear = Math.toIntExact(Math.floorDiv(calcEm, 13)); in plusMonths()
325 return Period.of(Math.toIntExact(years), months, days); in until()
/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java1229 public static int toIntExact(long value) { in toIntExact() method in StrictMath
1230 return Math.toIntExact(value); in toIntExact()
DMath.java1517 public static int toIntExact(long value) { in toIntExact() method in Math
/libcore/ojluni/src/test/java/io/InputStream/
DReadNBytes.java119 int off = Math.toIntExact(in.skip(generator.nextInt(max/2))); in test()
/libcore/ojluni/annotations/flagged_api/java/lang/
DStrictMath.annotated.java122 public static int toIntExact(long value) { throw new RuntimeException("Stub!"); } in toIntExact() method in StrictMath
DMath.annotated.java123 public static int toIntExact(long value) { throw new RuntimeException("Stub!"); } in toIntExact() method in Math
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoPeriodImpl.java235 return new ChronoPeriodImpl(chrono, Math.toIntExact(splitYears), splitMonths, days); in normalized()
DHijrahDate.java602 return getChronology().period(Math.toIntExact(years), months, days); in until()
DAbstractChronology.java491 yoe = Math.toIntExact(yoeLong); in resolveYearOfEra()
/libcore/ojluni/src/test/java/lang/StrictMath/
DExactArithTests.java291 int value = StrictMath.toIntExact(x); in testLongExact()
/libcore/ojluni/src/main/java/java/time/temporal/
DWeekFields.java943 … final int newValue = Math.toIntExact(value); // broad limit makes overflow checking lighter in resolve()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatterBuilder.java3667 int totalSecs = Math.toIntExact(offsetSecs); in format()
3974 int totalSecs = Math.toIntExact(offsetSecs); in format()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKLocalDate.java1946 int years = Math.toIntExact((long) Year.MAX_VALUE - (long) Year.MIN_VALUE);
/libcore/api/
Dcurrent.txt3650 method public static int toIntExact(long);
4092 method public static int toIntExact(long);