List of utility methods to do Object Hash
int | hashCode(Object o) Return a proper hashCode for the given object. if (o instanceof boolean[]) { return Arrays.hashCode((boolean[]) o); } else if (o instanceof byte[]) { return Arrays.hashCode((byte[]) o); } else if (o instanceof short[]) { return Arrays.hashCode((short[]) o); } else if (o instanceof char[]) { return Arrays.hashCode((char[]) o); ... |
int | hashCode(Object obj) Returns a hash code for an object handling null. if (obj == null) { return 0; if (obj.getClass().isArray()) { if (obj instanceof Object[]) { return Arrays.deepHashCode((Object[]) obj); } else if (obj instanceof int[]) { return Arrays.hashCode((int[]) obj); ... |
int | hashCode(Object obj) Returns a hash code for obj . if (obj == null) { return 0; final Class<?> clazz = obj.getClass(); if (!clazz.isArray()) { return obj.hashCode(); final Class<?> componentType = clazz.getComponentType(); ... |
int | hashCode(Object object) hash Code if (object == null) { return 0; } else if (object instanceof Object[]) { return Arrays.deepHashCode((Object[]) object); } else if (object instanceof int[]) { return Arrays.hashCode((int[]) object); } else if (object instanceof long[]) { return Arrays.hashCode((long[]) object); ... |
int | hashCode(Object... args) Returns the hash code of 'args'. return java.util.Arrays.hashCode(args);
|
int | hashCode(Object... objects) Returns the hash code value for the given objects , or 0 if it's null . if (objects == null) { return 0; } else if (objects.length == 1) { Object object = objects[0]; return object == null ? 0 : object.hashCode(); } else { return Arrays.hashCode(objects); |
int | makeHashCode(Object... objects) This belongs in a utility class. return makeHashCode(Arrays.asList(objects));
|
int | safeHashCode(Object o) Returns the hash-code of the specified object. int hash = 1; if (o != null) { if (o.getClass().isArray()) return Arrays.deepHashCode((Object[]) o); else hash = o.hashCode(); return hash; ... |
int | safeHashCode(Object... objects) safe Hash Code return Arrays.hashCode(objects);
|