List of utility methods to do Zero Format
int | zeroConvert(String src) zero Convert if (src == null || src.equals("null") || "".equals(src) || " ".equals(src)) return 0; else return Integer.parseInt(src.trim()); |
int | zerocount(int v) Return the number of zeros in the binary representation of the value of the argument. return bytezeros[v & 0xFF] + bytezeros[(v >> 8) & 0xFF] + bytezeros[(v >> 16) & 0xFF]
+ bytezeros[(v >> 24) & 0xFF];
|
int | zeroCount(long n) zero Count long k; int count = 63; if (n == 0) { return 64; k = n << 32; if (k != 0) { count -= 32; ... |
double | zeroDiv(double numerator, double denominator) Returns the division or zero if the denominator is zero. return (denominator == 0 ? 0 : numerator / denominator);
|
int | zeroes(final int ch) Returns the zero base for the specified code point, or -1 . for (final int z : ZEROES) if (ch >= z && ch <= z + 9) return z; return -1; |
String | zeroEsquerda(String s1, int tamString) zero Esquerda while (s1.length() < tamString) { s1 = "0" + s1; return s1; |
long | zeroExtend(long value, int inputBits) Zero extend an integer. if (inputBits < 64) { return value & ~(-1L << inputBits); } else { return value; |
void | zeroFill(float[] array) This method fills the given array of floats with zeros. for (int counter = 0; counter < array.length; counter++) { array[counter] = 0.0f; |
String | zeroFill(int iv, int len) zero Fill String v = String.valueOf(iv); if (v.length() < len) { StringBuilder bd = new StringBuilder(v); for (int i = 0; i < len - v.length(); i++) { bd.insert(0, '0'); return bd.toString(); } else { ... |
String | zeroFill(int num, int size, String character) Takes the number num, and displays it with size digits. StringBuilder res = new StringBuilder(); String snum = "" + num; for (int i = snum.length(); i < size; i++) { res.append(character); res.append(snum); return res.toString().substring(res.length() - size); |