Java Hash Calculate hash(Object obj)

Here you can find the source of hash(Object obj)

Description

hash

License

Open Source License

Parameter

Parameter Description
obj a parameter

Return

null when obj is null, otherwise obj.hashCode()

Declaration

public static Integer hash(Object obj) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from  ww  w  . j a  va  2 s  . co m
     * 
     * @param obj
     * @return null when obj is null, otherwise obj.hashCode()
     */
    public static Integer hash(Object obj) {
        Integer rtn = null;
        if (obj != null) {
            rtn = obj.hashCode();
        }
        return rtn;
    }
}

Related

  1. hash(long mover, long enemy)
  2. hash(Object a, Object b)
  3. hash(Object key, int limit)
  4. hash(Object o)
  5. hash(Object obj)
  6. hash(Object obj)
  7. hash(Object object)
  8. hash(Object v)
  9. hash(Object value)