List of utility methods to do Hash Calculate
int | hashCapacityForSize(final int size) Returns the minimal capacity of hash-based structures (e.g. return size * 4 / 3 + 1;
|
int | hashCharArray(int seed, char... charArray) Calculates hash code for char array. return hash(seed, charArray);
|
int | hashClassName(Class clazz) hash Class Name String className = clazz.getName();
return hashString(className);
|
int | hashCombine(int seed, int hash) from clojure.Util return seed ^ (hash + 0x9e3779b9 + (seed << 6) + (seed >> 2));
|
int | hashCombine(int seed, int hash) hash Combine seed ^= hash + 0x9e3779b9 + (seed << 6) + (seed >> 2);
return seed;
|
void | hashDisp(long hash) hash Disp long cntrl = hash & 0xFF; long cmd = (hash >> 8) & 0xFF; long chn = (hash >> 16) & 0xFF; System.out.println(chn + " " + cmd + " " + cntrl); |
int | hashDouble(double val) hash Double long bits = Double.doubleToLongBits(val); return (int) (bits ^ bits >>> 32); |
boolean | hashEqules(Object source, Object obj) hash Equles return (hash(source) == hash(obj));
|
int | hashFloat(float value) hash Float return Float.floatToIntBits(value);
|
long | hashFloatBits(long hash, float f) hash Float Bits hash *= 31L; if (f == 0.0f) return hash; return hash + Float.floatToIntBits(f); |