Java Hash Calculate hash(Object obj)

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

Description

hash

License

Open Source License

Declaration

public static int hash(Object obj) 

Method Source Code

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

public class Main {

    public static int hash(Object obj) {

        final int prime = 31;
        int result = 1;
        result = prime * result + ((obj == null) ? 0 : obj.hashCode());
        return result;
    }// ww w  .j a va 2  s . c o m
}

Related

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