Java Hash Code Calculate hashCode(final int seed, final int hashcode)

Here you can find the source of hashCode(final int seed, final int hashcode)

Description

hash Code

License

Apache License

Declaration

public static int hashCode(final int seed, final int hashcode) 

Method Source Code

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

public class Main {
    public static final int HASH_OFFSET = 37;

    public static int hashCode(final int seed, final int hashcode) {
        return seed * HASH_OFFSET + hashcode;
    }/*w w w. j  a v  a  2 s  .  c  o m*/

    public static int hashCode(final int seed, final boolean b) {
        return hashCode(seed, b ? 1 : 0);
    }

    public static int hashCode(final int seed, final Object obj) {
        return hashCode(seed, obj != null ? obj.hashCode() : 0);
    }
}

Related

  1. hashCode(double val)
  2. hashCode(final byte[] data)
  3. hashCode(final char[] text, final int textOffset, final int textLen)
  4. hashCode(final int i)
  5. hashCode(final int i)
  6. hashCode(final int x, final int y)
  7. hashcode(final int[] array)
  8. hashCode(final long l)
  9. hashCode(final long l)