@Override public int hashCode() { int hashCode = 7; for (ValueHolder valueHolder : this.genericArgumentValues) { hashCode = 31 * hashCode + valueHolder.contentHashCode(); } hashCode = 29 * hashCode; for (Map.Entry<Integer, ValueHolder> entry : this.indexedArgumentValues.entrySet()) { hashCode = 31 * hashCode + (entry.getValue().contentHashCode() ^ entry.getKey().hashCode()); } return hashCode; }
@Override public int hashCode() { return i.hashCode(); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((factionalSecondsPrecision == null) ? 0 : factionalSecondsPrecision.hashCode()); result = prime * result + ((precision == null) ? 0 : precision.hashCode()); result = prime * result + ((toFactionalSecondsPrecision == null) ? 0 : toFactionalSecondsPrecision.hashCode()); result = prime * result + ((toType == null) ? 0 : toType.hashCode()); result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getCategoryTagId() == null) ? 0 : getCategoryTagId().hashCode()); result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode()); result = prime * result + ((getTagId() == null) ? 0 : getTagId().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getUserRoleId() == null) ? 0 : getUserRoleId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getArticleCategoryId() == null) ? 0 : getArticleCategoryId().hashCode()); result = prime * result + ((getArticleId() == null) ? 0 : getArticleId().hashCode()); result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getPayTypeId() == null) ? 0 : getPayTypeId().hashCode()); result = prime * result + ((getPayVendorId() == null) ? 0 : getPayVendorId().hashCode()); result = prime * result + ((getPayMchId() == null) ? 0 : getPayMchId().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getArticleTagId() == null) ? 0 : getArticleTagId().hashCode()); result = prime * result + ((getArticleId() == null) ? 0 : getArticleId().hashCode()); result = prime * result + ((getTagId() == null) ? 0 : getTagId().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getUserOrganizationId() == null) ? 0 : getUserOrganizationId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getPayOutOrderDetailId() == null) ? 0 : getPayOutOrderDetailId().hashCode()); result = prime * result + ((getPayOutOrderId() == null) ? 0 : getPayOutOrderId().hashCode()); result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getPayPayId() == null) ? 0 : getPayPayId().hashCode()); result = prime * result + ((getPayTypeId() == null) ? 0 : getPayTypeId().hashCode()); result = prime * result + ((getParam() == null) ? 0 : getParam().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getUserPermissionId() == null) ? 0 : getUserPermissionId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getOauthId() == null) ? 0 : getOauthId().hashCode()); result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getSettingId() == null) ? 0 : getSettingId().hashCode()); result = prime * result + ((getSettingKey() == null) ? 0 : getSettingKey().hashCode()); result = prime * result + ((getSettingValue() == null) ? 0 : getSettingValue().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getTopicId() == null) ? 0 : getTopicId().hashCode()); result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode()); result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode()); result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode()); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getPayMchId() == null) ? 0 : getPayMchId().hashCode()); result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode()); result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); result = prime * result + ((getReqkey() == null) ? 0 : getReqkey().hashCode()); result = prime * result + ((getReskey() == null) ? 0 : getReskey().hashCode()); return result; } }
public void testHashCode() { for (int value : VALUES) { assertEquals(((Integer) value).hashCode(), Ints.hashCode(value)); } }
@Test public void shouldApplySupplementalHash() { Integer key = 123; this.map.put(key, "123"); assertThat(this.map.getSupplementalHash(), is(not(key.hashCode()))); assertThat(this.map.getSupplementalHash() >> 30 & 0xFF, is(not(0))); }
@Test public void hashCodeOf() { assertEquals(0, ObjectHelper.hashCode(null)); assertEquals(((Integer)1).hashCode(), ObjectHelper.hashCode(1)); }
@Test public void hashCodeIsTheInner() { Notification<Integer> n1 = Notification.createOnNext(1337); assertEquals(Integer.valueOf(1337).hashCode(), n1.hashCode()); assertEquals(0, Notification.createOnComplete().hashCode()); }