@Test public void testHashCodeSymmetric() throws Exception { assertEquals( maxValueCountItemA.hashCode(), maxValueCountItemACopy.hashCode() ); assertEquals( maxValueCountItemACopy.hashCode(), maxValueCountItemA.hashCode() ); }
@Override public int hashCode() { int hash = 37; if ( items != null ) { for ( MaxValueCountElem item : items ) { if ( item != null ) { hash = hash * 17 + item.hashCode(); } else { hash = hash * 17 + 37; } } } return hash; }
MaxValueCountItem extends ProtectedItem { @Override public int hashCode() { int hash = 37; if ( items != null ) { for ( MaxValueCountElem item : items ) { if ( item != null ) { hash = hash * 17 + item.hashCode(); } else { hash = hash * 17 + 37; } } } return hash; } }
MaxValueCountItem extends ProtectedItem { @Override public int hashCode() { int hash = 37; if ( items != null ) { for ( MaxValueCountElem item : items ) { if ( item != null ) { hash = hash * 17 + item.hashCode(); } else { hash = hash * 17 + 37; } } } return hash; } MaxValueCountItem( Set<MaxValueCountElem> items ); }
MaxValueCountItem extends ProtectedItem { @Override public int hashCode() { int hash = 37; if ( items != null ) { for ( MaxValueCountElem item : items ) { if ( item != null ) { hash = hash * 17 + item.hashCode(); } else { hash = hash * 17 + 37; } } } return hash; } MaxValueCountItem( Set<MaxValueCountElem> items ); Iterator<MaxValueCountElem> iterator(); @Override int hashCode(); @Override boolean equals( Object o ); @Override String toString(); }
MaxValueCountItem extends ProtectedItem { @Override public int hashCode() { int hash = 37; if ( items != null ) { for ( MaxValueCountElem item : items ) { if ( item != null ) { hash = hash * 17 + item.hashCode(); } else { hash = hash * 17 + 37; } } } return hash; } MaxValueCountItem( Set<MaxValueCountElem> items ); Iterator<MaxValueCountElem> iterator(); @Override int hashCode(); @Override boolean equals( Object o ); @Override String toString();  }