Home
last modified time | relevance | path

Searched refs:fraction (Results 1 – 10 of 10) sorted by relevance

/libcore/ojluni/src/main/java/sun/util/calendar/
DAbstractCalendar.java223 long fraction = date.getTimeOfDay(); in getTimeOfDay() local
224 if (fraction != CalendarDate.TIME_UNDEFINED) { in getTimeOfDay()
225 return fraction; in getTimeOfDay()
227 fraction = getTimeOfDayValue(date); in getTimeOfDay()
228 date.setTimeOfDay(fraction); in getTimeOfDay()
229 return fraction; in getTimeOfDay()
233 long fraction = date.getHours(); in getTimeOfDayValue() local
234 fraction *= 60; in getTimeOfDayValue()
235 fraction += date.getMinutes(); in getTimeOfDayValue()
236 fraction *= 60; in getTimeOfDayValue()
[all …]
DCalendarDate.java78 private long fraction; // time of day value in millisecond field in CalendarDate
300 return fraction = TIME_UNDEFINED; in getTimeOfDay()
302 return fraction; in getTimeOfDay()
335 protected void setTimeOfDay(long fraction) { in setTimeOfDay() argument
336 this.fraction = fraction; in setTimeOfDay()
DImmutableGregorianDate.java165 protected void setTimeOfDay(long fraction) { in setTimeOfDay() argument
/libcore/ojluni/src/main/java/java/nio/file/attribute/
DFileTime.java441 int fraction = ldt.getNano(); in toString() local
460 if (fraction != 0) { in toString()
464 while (fraction % 10 == 0) { in toString()
465 fraction /= 10; in toString()
468 append(sb, w, fraction); in toString()
/libcore/luni/src/main/java/java/math/
DBigDecimal.java2775 long fraction = unscaledVal % sizeOfFraction; in smallRound() local
2778 if (fraction != 0) { in smallRound()
2780 compRem = compareForRounding(fraction, sizeOfFraction); in smallRound()
2783 Long.signum(fraction) * (5 + compRem), in smallRound()
2812 private static int roundingBehavior(int parityBit, int fraction, RoundingMode roundingMode) { in roundingBehavior() argument
2817 if (fraction != 0) { in roundingBehavior()
2822 increment = Integer.signum(fraction); in roundingBehavior()
2827 increment = Math.max(Integer.signum(fraction), 0); in roundingBehavior()
2830 increment = Math.min(Integer.signum(fraction), 0); in roundingBehavior()
2833 if (Math.abs(fraction) >= 5) { in roundingBehavior()
[all …]
/libcore/ojluni/annotations/hiddenapi/sun/util/calendar/
DCalendarDate.java176 protected void setTimeOfDay(long fraction) { in setTimeOfDay() argument
266 private long fraction; field in CalendarDate
DAbstractCalendar.java84 sun.util.calendar.CalendarDate cdate, int fraction) { in setTimeOfDay() argument
DImmutableGregorianDate.java161 protected void setTimeOfDay(long fraction) { in setTimeOfDay() argument
/libcore/luni/src/test/java/libcore/java/text/
DDecimalFormatTest.java157 private void assertBigDecimalWithFraction(BigDecimal bd, String expectedResult, int fraction) { in assertBigDecimalWithFraction() argument
159 pf.setMaximumFractionDigits(fraction); in assertBigDecimalWithFraction()
163 …private void assertDecFmtWithMultiplierAndFraction(String value, int multiplier, int fraction, Str… in assertDecFmtWithMultiplierAndFraction() argument
166 df.setMaximumFractionDigits(fraction); in assertDecFmtWithMultiplierAndFraction()
171 …cFmtWithMultiplierAndFractionByLocale(String value, int multiplier, int fraction, Locale locale, S… in assertDecFmtWithMultiplierAndFractionByLocale() argument
174 df.setMaximumFractionDigits(fraction); in assertDecFmtWithMultiplierAndFractionByLocale()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatterBuilder.java2949 BigDecimal fraction = convertToFraction(value); in format() local
2950 if (fraction.scale() == 0) { // scale is zero if value is zero in format()
2960 int outputScale = Math.min(Math.max(fraction.scale(), minWidth), maxWidth); in format()
2961 fraction = fraction.setScale(outputScale, RoundingMode.FLOOR); in format()
2962 String str = fraction.toPlainString().substring(2); in format()
3007 BigDecimal fraction = new BigDecimal(total).movePointLeft(pos - position); in parse() local
3008 long value = convertFromFraction(fraction); in parse()
3034 BigDecimal fraction = valueBD.divide(rangeBD, 9, RoundingMode.FLOOR); in convertToFraction() local
3036 … return fraction.compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ZERO : fraction.stripTrailingZeros(); in convertToFraction()
3055 private long convertFromFraction(BigDecimal fraction) { in convertFromFraction() argument
[all …]