Java Hash Code Calculate combineHashesUnsorted(final int a, final int b)

Here you can find the source of combineHashesUnsorted(final int a, final int b)

Description

Combine two hash codes.

License

Open Source License

Parameter

Parameter Description
a the first hash code
b the second hash code

Return

the combined hash code

Declaration

public static final int combineHashesUnsorted(final int a, final int b) 

Method Source Code

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

public class Main {
    /**//from  www  .j a  v  a  2  s  .c o  m
     * Combine two hash codes. This operator returns a result which depends
     * on both hash codes {@code a} and {@code b}. This result does not
     * depend on the order of the parameters, i.e., it is the same for
     * {@code (a, b)} and {@code (b, a)}.
     *
     * @param a
     *          the first hash code
     * @param b
     *          the second hash code
     * @return the combined hash code
     */
    public static final int combineHashesUnsorted(final int a, final int b) {
        return (a + b);
    }
}

Related

  1. combineHashCodesHelper(int hashCode1, int hashCode2)
  2. combineHashes(int hash1, int hash2)
  3. combineHashesBad(int hash1, int hash2)
  4. combineHashesMurmur(int hash2, int hash1)
  5. combineHashesOld(int hash1, int hash2)
  6. generateHash(byte[] data)
  7. generateHash(char[] password, byte[] salt)
  8. generateHash(File file)
  9. generateHash(final String data)