MCPcopy Index your code
hub / github.com/assertj/assertj / hashCodeFor

Method hashCodeFor

src/main/java/org/assertj/core/util/Objects.java:92–95  ·  view source on GitHub ↗

Returns the hash code for the given object. If the object is null, this method returns zero. Otherwise calls the method hashCode of the given object. @param o the given object. @return the hash code for the given object

(Object o)

Source from the content-addressed store, hash-verified

90 * @return the hash code for the given object
91 */
92 public static int hashCodeFor(Object o) {
93 if (o == null) return 0;
94 return isArray(o) && !o.getClass().getComponentType().isPrimitive() ? java.util.Arrays.deepHashCode((Object[]) o) : o.hashCode() ;
95 }
96
97 /**
98 * Casts the given object to the given type only if the object is of the given type. If the object is not of the given

Callers 10

compareMethod · 0.95
hashCodeMethod · 0.80
hashCodeMethod · 0.80
hashCodeMethod · 0.80
hashCodeMethod · 0.80
hashCodeMethod · 0.80

Calls 3

isArrayMethod · 0.80
getComponentTypeMethod · 0.80
hashCodeMethod · 0.45