List of utility methods to do Hash Code Calculate
int | hashCode(char[] array) hash Code int h = 0; int len = array.length; for (int i = 0; i < len; i++) { h = 31 * h + array[i]; return (h); |
int | hashCode(char[] array, int start, int end) Returns hash of chars in range start (inclusive) to end (inclusive) int code = 0; for (int i = end - 1; i >= start; i--) { code = code * 31 + array[i]; return code; |
int | hashCode(char[] array, int start, int end) Returns hash of chars in range start (inclusive) to end (inclusive) int code = 0; for (int i = end - 1; i >= start; i--) code = code * 31 + array[i]; return code; |
int | hashCode(CharSequence seq) hash Code final int prime = 31; int result = 1; for (int i = 0, len = seq.length(); i < len; i++) { result = prime * result + seq.charAt(i); return result; |
int | hashCode(double dbl) Return the same value as Double#hashCode() .
long bits = Double.doubleToLongBits(dbl); return hashCode(bits); |
int | hashCode(double v) Computes the hash code of a double value. long bits = Double.doubleToLongBits(v); return hashCode(bits); |
int | hashCode(double val) Returns a hash code for the specified double value. return hashCode(Double.doubleToLongBits(val)); |
int | hashCode(final byte[] data) hash Code if (data == null) return Integer.MIN_VALUE; final int prime = 0x01000193; int hash = 0x811c9dc5; for (int i = data.length - 1; i >= 0; i--) { hash = (hash ^ data[i]) * prime; return hash; ... |
int | hashCode(final char[] text, final int textOffset, final int textLen) hash Code int h = 0; int off = textOffset; for (int i = 0; i < textLen; i++) { h = 31 * h + text[off++]; return h; |
int | hashCode(final int i) Provides a hash code based on the given integer value. return i;
|