Java Hash Calculate hash(int h)

Here you can find the source of hash(int h)

Description

hash

License

Open Source License

Declaration

public static final int hash(int h) 

Method Source Code

//package com.java2s;

public class Main {
    public static final int hash(int h) {
        h ^= (h >>> 20) ^ (h >>> 12);
        return h ^ (h >>> 7) ^ (h >>> 4);
    }/*from ww w . j ava 2s. co  m*/

    public static final int hash(long l) {
        return hash((int) (l ^ (l >>> 32)));
    }

    public static final int hash(final Object o) {
        if (o == null) {
            return 0;
        }
        return hash(o.hashCode());
    }
}

Related

  1. hash(finalObject object)
  2. hash(int aSeed, boolean aBoolean)
  3. hash(int aSeed, Object[] aArray)
  4. hash(int base, boolean field)
  5. hash(int h)
  6. hash(int h, boolean v)
  7. hash(int h, Object o)
  8. hash(int hash, boolean item)
  9. hash(int i, int j)