@Test public void testGetValueShortString1() { int aaa; String expected = "123\u00b7(10^24)"; String result = Utils.getValueShortString(new BigInteger("123456789123445654363653463")); assertEquals(expected, result); }
public static String getValueShortString(BigInteger number) { BigInteger result = number; int pow = 0; while (result.compareTo(_1000_) == 1 || result.compareTo(_1000_) == 0) { result = result.divide(_1000_); pow += 3; } return result.toString() + "\u00b7(" + "10^" + pow + ")"; }
Utils { public static String getValueShortString(BigInteger number) { BigInteger result = number; int pow = 0; while (result.compareTo(_1000_) == 1 || result.compareTo(_1000_) == 0) { result = result.divide(_1000_); pow += 3; } return result.toString() + "\u00b7(" + "10^" + pow + ")"; } }
Utils { public static String getValueShortString(BigInteger number) { BigInteger result = number; int pow = 0; while (result.compareTo(_1000_) == 1 || result.compareTo(_1000_) == 0) { result = result.divide(_1000_); pow += 3; } return result.toString() + "\u00b7(" + "10^" + pow + ")"; }  }
Utils { public static String getValueShortString(BigInteger number) { BigInteger result = number; int pow = 0; while (result.compareTo(_1000_) == 1 || result.compareTo(_1000_) == 0) { result = result.divide(_1000_); pow += 3; } return result.toString() + "\u00b7(" + "10^" + pow + ")"; }  static BigInteger unifiedNumericToBigInteger(String number); static String longToDateTime(long timestamp); static String longToTimePeriod(long msec); static ImageIcon getImageIcon(String resource); static String getValueShortString(BigInteger number); static byte[] addressStringToBytes(String hex); static boolean isValidAddress(byte[] addr); static String getAddressShortString(byte[] addr); static SecureRandom getRandom(); static String getHashListShort(List<byte[]> blockHashes); static String getNodeIdShort(String nodeId); static long toUnixTime(long javaTime); static long fromUnixTime(long unixTime); static T[] mergeArrays(T[] ... arr); static String align(String s, char fillChar, int targetLen, boolean alignRight); static String repeat(String s, int n); static List<ByteArrayWrapper> dumpKeys(DbSource<byte[]> ds); static DataWord allButOne64th(DataWord dw); static void showErrorAndExit(String message, String... messages); static void showWarn(String message, String... messages); static String sizeToStr(long size); static void sleep(long ms); static boolean isHexEncoded(String value); }
Utils { public static String getValueShortString(BigInteger number) { BigInteger result = number; int pow = 0; while (result.compareTo(_1000_) == 1 || result.compareTo(_1000_) == 0) { result = result.divide(_1000_); pow += 3; } return result.toString() + "\u00b7(" + "10^" + pow + ")"; }  static BigInteger unifiedNumericToBigInteger(String number); static String longToDateTime(long timestamp); static String longToTimePeriod(long msec); static ImageIcon getImageIcon(String resource); static String getValueShortString(BigInteger number); static byte[] addressStringToBytes(String hex); static boolean isValidAddress(byte[] addr); static String getAddressShortString(byte[] addr); static SecureRandom getRandom(); static String getHashListShort(List<byte[]> blockHashes); static String getNodeIdShort(String nodeId); static long toUnixTime(long javaTime); static long fromUnixTime(long unixTime); static T[] mergeArrays(T[] ... arr); static String align(String s, char fillChar, int targetLen, boolean alignRight); static String repeat(String s, int n); static List<ByteArrayWrapper> dumpKeys(DbSource<byte[]> ds); static DataWord allButOne64th(DataWord dw); static void showErrorAndExit(String message, String... messages); static void showWarn(String message, String... messages); static String sizeToStr(long size); static void sleep(long ms); static boolean isHexEncoded(String value); static double JAVA_VERSION; }