Java Hash Calculate hash(int k)

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

Description

hash

License

Apache License

Declaration

public static int hash(int k) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static int hash(int k) {
        k ^= k >>> 16;/*from   ww  w .j  a v  a  2  s . c o m*/
        k *= 0x85ebca6b;
        k ^= k >>> 13;
        k *= 0xc2b2ae35;
        k ^= k >>> 16;
        return k;
    }

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

Related

  1. hash(int h, boolean v)
  2. hash(int h, Object o)
  3. hash(int hash, boolean item)
  4. hash(int i, int j)
  5. hash(int k)
  6. hash(int key)
  7. hash(int n)
  8. hash(int p_188208_0_)
  9. hash(int seed, boolean value)