/** * Constructs a new {@code BigDecimal} instance from a given unscaled value * {@code unscaledVal} and a given scale. The value of this instance is * {@code unscaledVal * 10<sup>-scale</sup>}). * * @throws NullPointerException * if {@code unscaledVal == null}. */ public BigDecimal(BigInteger unscaledVal, int scale) { if (unscaledVal == null) { throw new NullPointerException("unscaledVal == null"); } this.scale = scale; setUnscaledValue(unscaledVal); }
bitLength = bitLength(smallValue); } else { setUnscaledValue(new BigInteger(unscaledBuffer.toString()));
bitLength = bitLength(smallValue); } else { setUnscaledValue(Multiplication.multiplyByFivePow(BigInteger.valueOf(mantissa), scale));
setUnscaledValue(integerAndFraction[0]);
integralValue.setUnscaledValue(strippedBI); return integralValue;
/** * Constructs a new {@code BigDecimal} instance from a given unscaled value * {@code unscaledVal} and a given scale. The value of this instance is * {@code unscaledVal * 10<sup>-scale</sup>}). * * @throws NullPointerException * if {@code unscaledVal == null}. */ public BigDecimal(BigInteger unscaledVal, int scale) { if (unscaledVal == null) { throw new NullPointerException("unscaledVal == null"); } this.scale = scale; setUnscaledValue(unscaledVal); }
/** * Constructs a new {@code BigDecimal} instance from a given unscaled value * {@code unscaledVal} and a given scale. The value of this instance is * {@code unscaledVal * 10<sup>-scale</sup>}). * * @throws NullPointerException * if {@code unscaledVal == null}. */ public BigDecimal(BigInteger unscaledVal, int scale) { if (unscaledVal == null) { throw new NullPointerException("unscaledVal == null"); } this.scale = scale; setUnscaledValue(unscaledVal); }
/** * Constructs a new {@code BigDecimal} instance from a given unscaled value * {@code unscaledVal} and a given scale. The value of this instance is * {@code unscaledVal * 10<sup>-scale</sup>}). * * @throws NullPointerException * if {@code unscaledVal == null}. */ public BigDecimal(BigInteger unscaledVal, int scale) { if (unscaledVal == null) { throw new NullPointerException("unscaledVal == null"); } this.scale = scale; setUnscaledValue(unscaledVal); }
/** * Constructs a new {@code BigDecimal} instance from a given unscaled value * {@code unscaledVal} and a given scale. The value of this instance is * {@code unscaledVal * 10<sup>-scale</sup>}). * * @throws NullPointerException * if {@code unscaledVal == null}. */ public BigDecimal(BigInteger unscaledVal, int scale) { if (unscaledVal == null) { throw new NullPointerException("unscaledVal == null"); } this.scale = scale; setUnscaledValue(unscaledVal); }
/** * Constructs a new {@code BigDecimal} instance from a given unscaled value * {@code unscaledVal} and a given scale. The value of this instance is * {@code unscaledVal * 10<sup>-scale</sup>}). * * @throws NullPointerException * if {@code unscaledVal == null}. */ public BigDecimal(BigInteger unscaledVal, int scale) { if (unscaledVal == null) { throw new NullPointerException("unscaledVal == null"); } this.scale = scale; setUnscaledValue(unscaledVal); }
/** * Constructs a new {@code BigDecimal} instance from a given unscaled value * {@code unscaledVal} and a given scale. The value of this instance is * {@code unscaledVal * 10<sup>-scale</sup>}). * * @throws NullPointerException * if {@code unscaledVal == null}. */ public BigDecimal(BigInteger unscaledVal, int scale) { if (unscaledVal == null) { throw new NullPointerException("unscaledVal == null"); } this.scale = scale; setUnscaledValue(unscaledVal); }
bitLength = bitLength(smallValue); } else { setUnscaledValue(Multiplication.multiplyByFivePow(BigInteger.valueOf(mantissa), scale));
bitLength = bitLength(smallValue); } else { setUnscaledValue(Multiplication.multiplyByFivePow(BigInteger.valueOf(mantissa), scale));
bitLength = bitLength(smallValue); } else { setUnscaledValue(Multiplication.multiplyByFivePow(BigInteger.valueOf(mantissa), scale));
setUnscaledValue(integerAndFraction[0]);
setUnscaledValue(integerAndFraction[0]);
setUnscaledValue(integerAndFraction[0]);
setUnscaledValue(integerAndFraction[0]);
setUnscaledValue(integerAndFraction[0]);
setUnscaledValue(integerAndFraction[0]);