@Override public int hashCode() { return Boolean.hashCode(all); }
/** * Return the same value as {@link Boolean#hashCode(boolean)}}. * @deprecated as of Spring Framework 5.0, in favor of the native JDK 8 variant */ @Deprecated public static int hashCode(boolean bool) { return Boolean.hashCode(bool); }
/** * Calculate hash code of a boolean value * @param value the value to compute hash code for * @return the hash code of the given value */ public static int hashCode( boolean value ) { return Boolean.hashCode( value ); }
/** * Return a hash code based on the contents of the specified array. * If {@code array} is {@code null}, this method returns 0. */ public static int nullSafeHashCode(@Nullable boolean[] array) { if (array == null) { return 0; } int hash = INITIAL_HASH; for (boolean element : array) { hash = MULTIPLIER * hash + Boolean.hashCode(element); } return hash; }
@Override public int hashCode() { int h = 1; if (_id != null) { h += _id.hashCode(); } if (_useInput != null) { h += _useInput.hashCode(); } return h; }
@Override public int hashCode() { int h = 1; if (_id != null) { h += _id.hashCode(); } if (_useInput != null) { h += _useInput.hashCode(); } return h; }
@Override public int hashCode() { return 31 * Boolean.hashCode(precomputed.immutableTargetType) + Arrays.hashCode(fieldSerializers); }
@Override public int hashCode() { return i.hashCode(); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (Boolean.valueOf(parenthesized).hashCode()); result = prime * result + distionOption; result = prime * result + ((from == null) ? 0 : from.hashCode()); result = prime * result + ((groupBy == null) ? 0 : groupBy.hashCode()); result = prime * result + ((into == null) ? 0 : into.hashCode()); result = prime * result + ((selectList == null) ? 0 : selectList.hashCode()); result = prime * result + ((where == null) ? 0 : where.hashCode()); return result; }
@Override public int hashCode() { int result = intervals.hashCode(); result = 31 * result + rollup.hashCode(); result = 31 * result + (queryGranularity != null ? queryGranularity.hashCode() : 0); return result; }
@Override public int hashCode() { int result = segmentGranularity.hashCode(); result = 31 * result + queryGranularity.hashCode(); result = 31 * result + rollup.hashCode(); result = 31 * result + (inputIntervals != null ? inputIntervals.hashCode() : 0); result = 31 * result + (wrappedSpec != null ? wrappedSpec.hashCode() : 0); return result; }
@Override public int hashCode() { int result = description != null ? description.hashCode() : 0; result = 31 * result + (content != null ? content.hashCode() : 0); result = 31 * result + (required != null ? required.hashCode() : 0); result = 31 * result + (extensions != null ? extensions.hashCode() : 0); result = 31 * result + ($ref != null ? $ref.hashCode() : 0); return result; }
@Override public int hashCode() { int result = methodName != null ? methodName.hashCode() : 0; result = 31 * result + (int) (methodNameHashCod64 ^ (methodNameHashCod64 >>> 32)); result = 31 * result + (option != null ? option.hashCode() : 0); result = 31 * result + (arguments != null ? arguments.hashCode() : 0); result = 31 * result + (keep != null ? keep.hashCode() : 0); result = 31 * result + (filter != null ? filter.hashCode() : 0); result = 31 * result + (over != null ? over.hashCode() : 0); result = 31 * result + (overRef != null ? overRef.hashCode() : 0); result = 31 * result + (withinGroup != null ? withinGroup.hashCode() : 0); result = 31 * result + (ignoreNulls != null ? ignoreNulls.hashCode() : 0); return result; }
@Test @Deprecated public void hashCodeWithBooleanFalse() { int expected = Boolean.FALSE.hashCode(); assertEquals(expected, ObjectUtils.hashCode(false)); }
@Test @Deprecated public void hashCodeWithBooleanTrue() { int expected = Boolean.TRUE.hashCode(); assertEquals(expected, ObjectUtils.hashCode(true)); }
@Test public void testHashCode() { final MutableBoolean mutBoolA = new MutableBoolean(false); final MutableBoolean mutBoolB = new MutableBoolean(false); final MutableBoolean mutBoolC = new MutableBoolean(true); assertEquals(mutBoolA.hashCode(), mutBoolA.hashCode()); assertEquals(mutBoolA.hashCode(), mutBoolB.hashCode()); assertFalse(mutBoolA.hashCode() == mutBoolC.hashCode()); assertEquals(mutBoolA.hashCode(), Boolean.FALSE.hashCode()); assertEquals(mutBoolC.hashCode(), Boolean.TRUE.hashCode()); }