@Test public void double2BigIntTest() { assertEquals(new BigInteger("2"), DecimalUtils.double2BigInt(2d)); assertEquals(new BigInteger("2"), DecimalUtils.double2BigInt(2.1d)); assertEquals(new BigInteger("0"), DecimalUtils.double2BigInt(0.1d)); }
public static BigInteger double2BigInt(double d) { return new BigInteger(decimalFormat.format(d)); }
DecimalUtils { public static BigInteger double2BigInt(double d) { return new BigInteger(decimalFormat.format(d)); } }
DecimalUtils { public static BigInteger double2BigInt(double d) { return new BigInteger(decimalFormat.format(d)); } private  DecimalUtils(); }
DecimalUtils { public static BigInteger double2BigInt(double d) { return new BigInteger(decimalFormat.format(d)); } private  DecimalUtils(); static int convert2Hex(int n); static BigInteger double2BigInt(double d); static String saveTwoPoint(double d); static String savePoint(double d, int point); static byte[] byteBuffer2byteArray(ByteBuffer bb); static ByteBuffer byteArray2byteBuffer(byte[] ba); }
DecimalUtils { public static BigInteger double2BigInt(double d) { return new BigInteger(decimalFormat.format(d)); } private  DecimalUtils(); static int convert2Hex(int n); static BigInteger double2BigInt(double d); static String saveTwoPoint(double d); static String savePoint(double d, int point); static byte[] byteBuffer2byteArray(ByteBuffer bb); static ByteBuffer byteArray2byteBuffer(byte[] ba);  }