List of utility methods to do Hash Code Calculate
int | hashCodeForDoubleArray(double[] a) Returns a hash code for a double[] instance.
if (a == null) { return 0; int result = 193; long temp; for (int i = 0; i < a.length; i++) { temp = Double.doubleToLongBits(a[i]); result = 29 * result + (int) (temp ^ (temp >>> 32)); ... |
int | hashCodeLowerCase(Object... toHash) lower cases any strings and then hashes them for (int i = 0; i < toHash.length; i++) { Object o = toHash[i]; if (o instanceof String) { toHash[i] = ((String) o).toLowerCase(); return hashCode(toHash); |
int | hashCodeNullSafe(final Object o) hash Code Null Safe return o != null ? o.hashCode() : 0;
|
int | hashCodeOf(Object o) hash Code Of if (o != null) return o.hashCode(); else return 0; |
int | hashCodeOrDefault(Object obj) hash Code Or Default return hashCodeOrDefault(obj, 0);
|
int | hashCodeOrNull(Object[] array) Returns a hash code for the elements of the given array, or 0 if it is null. return array == null ? 0 : hashCode(array, array.length);
|
int | hashCodeOrZero(Object o) hash Code Or Zero return o != null ? o.hashCode() : 0;
|
int | hashCodeSafe(final Object value) Determines the hash code of the given value by calling the hashCode method on the given object if it is not null. if (value == null) { return 0; } else { return value.hashCode(); |