List of usage examples for java.lang Object hashCode
@HotSpotIntrinsicCandidate public native int hashCode();
From source file:com.clark.func.Functions.java
/** * <p>/*from w w w. j a v a 2 s . com*/ * Gets the hash code of an object returning zero when the object is * <code>null</code>. * </p> * * <pre> * ObjectUtils.hashCode(null) = 0 * ObjectUtils.hashCode(obj) = obj.hashCode() * </pre> * * @param obj * the object to obtain the hash code of, may be * <code>null</code> * @return the hash code of the object, or zero if null * @since 2.1 */ public static int objectHashCode(Object obj) { return (obj == null) ? 0 : obj.hashCode(); }