/** * calculate the array hash (only the first level) */ public static int hash(byte[] bytes) { int length = bytes.length; int seed = SEED; for (int index = 0 ; index < length ; index++) { seed = hash( seed, (int) bytes[index] ) ; } return seed; }
/** * calculate the array hash (only the first level) */ public static int hash(char[] array) { int length = array.length; int seed = SEED; for (int index = 0 ; index < length ; index++) { seed = hash( seed, (int) array[index] ) ; } return seed; }
/** * calculate the array hash (only the first level) */ public static int hash(char[] array) { int length = array.length; int seed = SEED; for (int index = 0 ; index < length ; index++) { seed = hash( seed, (int) array[index] ) ; } return seed; }
/** * calculate the array hash (only the first level) */ public static int hash(byte[] bytes) { int length = bytes.length; int seed = SEED; for (int index = 0 ; index < length ; index++) { seed = hash( seed, (int) bytes[index] ) ; } return seed; }
/** * calculate the array hash (only the first level) */ public static int hash(Object[] array) { int length = array.length; int seed = SEED; for (int index = 0 ; index < length ; index++) { seed = hash( seed, array[index] == null ? 0 : array[index].hashCode() ); } return seed; }
/** * calculate the array hash (only the first level) */ public static int hash(Object[] array) { int length = array.length; int seed = SEED; for (int index = 0 ; index < length ; index++) { seed = hash( seed, array[index] == null ? 0 : array[index].hashCode() ); } return seed; }