public void setRoundingMode(RoundingMode roundingMode, double roundingIncrement) { final int nativeRoundingMode; switch (roundingMode) { case CEILING: nativeRoundingMode = 0; break; case FLOOR: nativeRoundingMode = 1; break; case DOWN: nativeRoundingMode = 2; break; case UP: nativeRoundingMode = 3; break; case HALF_EVEN: nativeRoundingMode = 4; break; case HALF_DOWN: nativeRoundingMode = 5; break; case HALF_UP: nativeRoundingMode = 6; break; default: throw new AssertionError(); } setRoundingMode(address, nativeRoundingMode, roundingIncrement); }
/** * Sets the {@code RoundingMode} used by this {@code NumberFormat}. * @since 1.6 */ public void setRoundingMode(RoundingMode roundingMode) { if (roundingMode == null) { throw new NullPointerException("roundingMode == null"); } this.roundingMode = roundingMode; if (roundingMode != RoundingMode.UNNECESSARY) { // ICU4C doesn't support UNNECESSARY. double roundingIncrement = 1.0 / Math.pow(10, Math.max(0, getMaximumFractionDigits())); ndf.setRoundingMode(roundingMode, roundingIncrement); } } }
public void setRoundingMode(RoundingMode roundingMode, double roundingIncrement) { final int nativeRoundingMode; switch (roundingMode) { case CEILING: nativeRoundingMode = 0; break; case FLOOR: nativeRoundingMode = 1; break; case DOWN: nativeRoundingMode = 2; break; case UP: nativeRoundingMode = 3; break; case HALF_EVEN: nativeRoundingMode = 4; break; case HALF_DOWN: nativeRoundingMode = 5; break; case HALF_UP: nativeRoundingMode = 6; break; default: throw new AssertionError(); } setRoundingMode(address, nativeRoundingMode, roundingIncrement); }
public void setRoundingMode(RoundingMode roundingMode, double roundingIncrement) { final int nativeRoundingMode; switch (roundingMode) { case CEILING: nativeRoundingMode = 0; break; case FLOOR: nativeRoundingMode = 1; break; case DOWN: nativeRoundingMode = 2; break; case UP: nativeRoundingMode = 3; break; case HALF_EVEN: nativeRoundingMode = 4; break; case HALF_DOWN: nativeRoundingMode = 5; break; case HALF_UP: nativeRoundingMode = 6; break; default: throw new AssertionError(); } setRoundingMode(address, nativeRoundingMode, roundingIncrement); }
public void setRoundingMode(RoundingMode roundingMode, double roundingIncrement) { final int nativeRoundingMode; switch (roundingMode) { case CEILING: nativeRoundingMode = 0; break; case FLOOR: nativeRoundingMode = 1; break; case DOWN: nativeRoundingMode = 2; break; case UP: nativeRoundingMode = 3; break; case HALF_EVEN: nativeRoundingMode = 4; break; case HALF_DOWN: nativeRoundingMode = 5; break; case HALF_UP: nativeRoundingMode = 6; break; default: throw new AssertionError(); } setRoundingMode(address, nativeRoundingMode, roundingIncrement); }
public void setRoundingMode(RoundingMode roundingMode, double roundingIncrement) { final int nativeRoundingMode; switch (roundingMode) { case CEILING: nativeRoundingMode = 0; break; case FLOOR: nativeRoundingMode = 1; break; case DOWN: nativeRoundingMode = 2; break; case UP: nativeRoundingMode = 3; break; case HALF_EVEN: nativeRoundingMode = 4; break; case HALF_DOWN: nativeRoundingMode = 5; break; case HALF_UP: nativeRoundingMode = 6; break; default: throw new AssertionError(); } setRoundingMode(address, nativeRoundingMode, roundingIncrement); }
public void setRoundingMode(RoundingMode roundingMode, double roundingIncrement) { final int nativeRoundingMode; switch (roundingMode) { case CEILING: nativeRoundingMode = 0; break; case FLOOR: nativeRoundingMode = 1; break; case DOWN: nativeRoundingMode = 2; break; case UP: nativeRoundingMode = 3; break; case HALF_EVEN: nativeRoundingMode = 4; break; case HALF_DOWN: nativeRoundingMode = 5; break; case HALF_UP: nativeRoundingMode = 6; break; default: throw new AssertionError(); } setRoundingMode(address, nativeRoundingMode, roundingIncrement); }
public void setRoundingMode(RoundingMode roundingMode, double roundingIncrement) { final int nativeRoundingMode; switch (roundingMode) { case CEILING: nativeRoundingMode = 0; break; case FLOOR: nativeRoundingMode = 1; break; case DOWN: nativeRoundingMode = 2; break; case UP: nativeRoundingMode = 3; break; case HALF_EVEN: nativeRoundingMode = 4; break; case HALF_DOWN: nativeRoundingMode = 5; break; case HALF_UP: nativeRoundingMode = 6; break; default: throw new AssertionError(); } setRoundingMode(address, nativeRoundingMode, roundingIncrement); }
/** * Sets the {@code RoundingMode} used by this {@code NumberFormat}. * @since 1.6 */ public void setRoundingMode(RoundingMode roundingMode) { if (roundingMode == null) { throw new NullPointerException("roundingMode == null"); } this.roundingMode = roundingMode; if (roundingMode != RoundingMode.UNNECESSARY) { // ICU4C doesn't support UNNECESSARY. double roundingIncrement = 1.0 / Math.pow(10, Math.max(0, getMaximumFractionDigits())); ndf.setRoundingMode(roundingMode, roundingIncrement); } } }
/** * Sets the {@code RoundingMode} used by this {@code NumberFormat}. * @since 1.6 */ public void setRoundingMode(RoundingMode roundingMode) { if (roundingMode == null) { throw new NullPointerException("roundingMode == null"); } this.roundingMode = roundingMode; if (roundingMode != RoundingMode.UNNECESSARY) { // ICU4C doesn't support UNNECESSARY. double roundingIncrement = 1.0 / Math.pow(10, Math.max(0, getMaximumFractionDigits())); ndf.setRoundingMode(roundingMode, roundingIncrement); } } }
/** * Sets the {@code RoundingMode} used by this {@code NumberFormat}. * @since 1.6 */ public void setRoundingMode(RoundingMode roundingMode) { if (roundingMode == null) { throw new NullPointerException("roundingMode == null"); } this.roundingMode = roundingMode; if (roundingMode != RoundingMode.UNNECESSARY) { // ICU4C doesn't support UNNECESSARY. double roundingIncrement = 1.0 / Math.pow(10, Math.max(0, getMaximumFractionDigits())); ndf.setRoundingMode(roundingMode, roundingIncrement); } } }
/** * Sets the {@code RoundingMode} used by this {@code NumberFormat}. * @since 1.6 */ public void setRoundingMode(RoundingMode roundingMode) { if (roundingMode == null) { throw new NullPointerException("roundingMode == null"); } this.roundingMode = roundingMode; if (roundingMode != RoundingMode.UNNECESSARY) { // ICU4C doesn't support UNNECESSARY. double roundingIncrement = 1.0 / Math.pow(10, Math.max(0, getMaximumFractionDigits())); ndf.setRoundingMode(roundingMode, roundingIncrement); } } }
/** * Sets the {@code RoundingMode} used by this {@code NumberFormat}. * @since 1.6 */ public void setRoundingMode(RoundingMode roundingMode) { if (roundingMode == null) { throw new NullPointerException("roundingMode == null"); } this.roundingMode = roundingMode; if (roundingMode != RoundingMode.UNNECESSARY) { // ICU4C doesn't support UNNECESSARY. double roundingIncrement = 1.0 / Math.pow(10, Math.max(0, getMaximumFractionDigits())); ndf.setRoundingMode(roundingMode, roundingIncrement); } } }
/** * Sets the {@code RoundingMode} used by this {@code NumberFormat}. * @since 1.6 */ public void setRoundingMode(RoundingMode roundingMode) { if (roundingMode == null) { throw new NullPointerException("roundingMode == null"); } this.roundingMode = roundingMode; if (roundingMode != RoundingMode.UNNECESSARY) { // ICU4C doesn't support UNNECESSARY. double roundingIncrement = 1.0 / Math.pow(10, Math.max(0, getMaximumFractionDigits())); ndf.setRoundingMode(roundingMode, roundingIncrement); } } }