private static PrecisionError getOutOfBoundsError(BigDecimal abs, String sized, BigDecimal bound) { return new PrecisionError(abs.toPlainString() + " absolute XRP is " + sized + bound); }
private void initialize() { if (isNative()) { issuer = AccountID.XRP_ISSUER; if (!unbounded) { checkXRPBounds(); } // Offset is unused for native amounts exponent = -6; // compared to drops. } else { issuer = AccountID.NEUTRAL; exponent = calculateExponent(); if (value.precision() > MAXIMUM_IOU_PRECISION && !unbounded) { String err = "value precision of " + value.precision() + " is greater than maximum " + "iou precision of " + MAXIMUM_IOU_PRECISION; throw new PrecisionError(err, this); } } }