/** * You can fill the cache in advance if you want to. * * @param decimals */ public static void fillCache(int decimals) { int step = 1; switch(decimals) { case 0: step = 100; break; case 1: step = 10; break; } for (int i = 1; i < byteCacheSize; i += step) { if (byteCache[i] != null) continue; byteCache[i] = convertToBytes(i); } }
/** * You can fill the cache in advance if you want to. * * @param decimals */ public static void fillCache(int decimals) { int step = 1; switch(decimals) { case 0: step = 100; break; case 1: step = 10; break; } for (int i = 1; i < byteCacheSize; i += step) { if (byteCache[i] != null) continue; byteCache[i] = convertToBytes(i); } }
/** * You can fill the cache in advance if you want to. * * @param decimals */ public static void fillCache(int decimals) { int step = 1; switch(decimals) { case 0: step = 100; break; case 1: step = 10; break; } for (int i = 1; i < byteCacheSize; i += step) { if (byteCache[i] != null) continue; byteCache[i] = convertToBytes(i); } }