/** * Compute a combined hash code from the supplied objects. This method always returns 0 if no objects are supplied. * * @param objects the objects that should be used to compute the hash code * @return the hash code */ public static int compute( Object... objects ) { return _compute(0, objects); }
/** * Compute a combined hash code from the supplied objects. This method always returns 0 if no objects are supplied. * * @param objects the objects that should be used to compute the hash code * @return the hash code */ public static int compute( Object... objects ) { return _compute(0, objects); }
/** * Compute a combined hash code from the supplied objects. This method always returns 0 if no objects are supplied. * * @param objects the objects that should be used to compute the hash code * @return the hash code */ public static int compute( Object... objects ) { return _compute(0, objects); }
@Test public void shouldComputeHashCodeForOnePrimitive() { assertThat(HashCode._compute(1), is(not(0))); assertThat(HashCode.compute((long)8), is(not(0))); assertThat(HashCode._compute((short) 3), is(not(0))); assertThat(HashCode.compute(1.0f), is(not(0))); assertThat(HashCode.compute(1.0d), is(not(0))); assertThat(HashCode.compute(true), is(not(0))); }