Home
last modified time | relevance | path

Searched refs:subtractExact (Results 1 – 19 of 19) sorted by relevance

/libcore/ojluni/src/main/java/java/time/chrono/
DAbstractChronology.java524 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1); in resolveYMD()
525 long days = Math.subtractExact(fieldValues.remove(DAY_OF_MONTH), 1); in resolveYMD()
544 long days = Math.subtractExact(fieldValues.remove(DAY_OF_YEAR), 1); in resolveYD()
554 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1); in resolveYMAA()
555 long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1); in resolveYMAA()
556 long days = Math.subtractExact(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_MONTH), 1); in resolveYMAA()
572 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1); in resolveYMAD()
573 long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1); in resolveYMAD()
574 long dow = Math.subtractExact(fieldValues.remove(DAY_OF_WEEK), 1); in resolveYMAD()
590 long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_YEAR), 1); in resolveYAA()
[all …]
DIsoChronology.java614 … addFieldValue(fieldValues, YEAR, (year > 0 ? yoeLong: Math.subtractExact(1, yoeLong))); in resolveYearOfEra()
621 …ieldValue(fieldValues, YEAR, (year == null || year > 0 ? yoeLong: Math.subtractExact(1, yoeLong))); in resolveYearOfEra()
626 addFieldValue(fieldValues, YEAR, Math.subtractExact(1, yoeLong)); in resolveYearOfEra()
640 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1); in resolveYMD()
641 long days = Math.subtractExact(fieldValues.remove(DAY_OF_MONTH), 1); in resolveYMD()
DChronoPeriodImpl.java189 Math.subtractExact(years, amount.years), in minus()
190 Math.subtractExact(months, amount.months), in minus()
191 Math.subtractExact(days, amount.days)); in minus()
DJapaneseChronology.java477 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1); in resolveYMD()
478 long days = Math.subtractExact(fieldValues.remove(DAY_OF_MONTH), 1); in resolveYMD()
510 long days = Math.subtractExact(fieldValues.remove(DAY_OF_YEAR), 1); in resolveYD()
/libcore/ojluni/src/main/java/java/time/temporal/
DJulianFields.java290 return (R) temporal.with(EPOCH_DAY, Math.subtractExact(newValue, offset)); in adjustInto()
300 return chrono.dateEpochDay(Math.subtractExact(value, offset)); in resolve()
DIsoFields.java362 … date = LocalDate.of(y, 1, 1).plusMonths(Math.multiplyExact(Math.subtractExact(qoyLong, 1), 3)); in resolve()
363 doq = Math.subtractExact(doq, 1); in resolve()
486 return (R) temporal.plus(Math.subtractExact(newValue, getFrom(temporal)), WEEKS); in adjustInto()
506 date = date.plusWeeks(Math.subtractExact(dow, 7) / 7); in resolve()
509 date = date.plusWeeks(Math.subtractExact(wowby, 1)).with(DAY_OF_WEEK, dow); in resolve()
735 return Math.subtractExact(temporal2Exclusive.getLong(WEEK_BASED_YEAR), in between()
DWeekFields.java986 date = chrono.date(year, 1, 1).plus(Math.subtractExact(month, 1), MONTHS); in resolveWoM()
987 long weeks = Math.subtractExact(wom, localizedWeekOfMonth(date)); in resolveWoM()
1012 long weeks = Math.subtractExact(woy, localizedWeekOfYear(date)); in resolveWoY()
1038 long weeks = Math.subtractExact(wowby, 1); in resolveWBY()
/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java891 public static int subtractExact(int x, int y) { in subtractExact() method in StrictMath
892 return Math.subtractExact(x, y); in subtractExact()
906 public static long subtractExact(long x, long y) { in subtractExact() method in StrictMath
907 return Math.subtractExact(x, y); in subtractExact()
DMath.java1095 public static int subtractExact(int x, int y) { in subtractExact() method in Math
1116 public static long subtractExact(long x, long y) { in subtractExact() method in Math
/libcore/ojluni/src/main/java/java/time/
DPeriod.java713 Math.subtractExact(years, isoAmount.years), in minus()
714 Math.subtractExact(months, isoAmount.months), in minus()
715 Math.subtractExact(days, isoAmount.days)); in minus()
DInstant.java1142 case MILLIS: return Math.subtractExact(end.toEpochMilli(), toEpochMilli()); in until()
1155 long secsDiff = Math.subtractExact(end.seconds, seconds); in nanosUntil()
1161 long secsDiff = Math.subtractExact(end.seconds, seconds); in secondsUntil()
/libcore/luni/src/test/java/libcore/java/lang/
DStrictMathTest.java57 assertEquals(expected, StrictMath.subtractExact(a, b)); in testSubtractExactI()
110 assertEquals(expected, BigInteger.valueOf(StrictMath.subtractExact(a, b))); in testSubtractExactL()
DMathTest.java60 assertEquals(expected, Math.subtractExact(a, b)); in testSubtractExactI()
149 assertEquals(expected, BigInteger.valueOf(Math.subtractExact(a, b))); in testSubtractExactL()
/libcore/ojluni/annotations/flagged_api/java/lang/
DStrictMath.annotated.java82 public static int subtractExact(int x, int y) { throw new RuntimeException("Stub!"); } in subtractExact() method in StrictMath
84 public static long subtractExact(long x, long y) { throw new RuntimeException("Stub!"); } in subtractExact() method in StrictMath
DMath.annotated.java83 public static int subtractExact(int x, int y) { throw new RuntimeException("Stub!"); } in subtractExact() method in Math
85 public static long subtractExact(long x, long y) { throw new RuntimeException("Stub!"); } in subtractExact() method in Math
/libcore/ojluni/src/test/java/lang/StrictMath/
DExactArithTests.java91 int diff = StrictMath.subtractExact(x, y); in testIntegerExact()
237 long diff = StrictMath.subtractExact(x, y); in testLongExact()
/libcore/ojluni/src/test/java/time/test/java/time/
DTestClock_System.java295 return one > two ? Math.subtractExact(one, two) in distance()
296 : Math.subtractExact(two, one); in distance()
/libcore/ojluni/src/test/java/lang/Math/
DExactArithTests.java118 int diff = Math.subtractExact(x, y); in testIntegerExact()
371 long diff = Math.subtractExact(x, y); in testLongExact()
/libcore/api/
Dcurrent.txt3645 method public static int subtractExact(int, int);
3646 method public static long subtractExact(long, long);
4087 method public static int subtractExact(int, int);
4088 method public static long subtractExact(long, long);