@Test public void testHashCodeTransitive() throws Exception { assertEquals( classesItemA.hashCode(), classesItemACopy.hashCode() ); assertEquals( classesItemACopy.hashCode(), classesItemB.hashCode() ); assertEquals( classesItemA.hashCode(), classesItemB.hashCode() ); }
@Override public int hashCode() { int hash = 37; if ( classes != null ) { hash = hash * 17 + classes.hashCode(); } else { hash = hash * 17 + getClass().getName().hashCode(); } return hash; }
ClassesItem extends ProtectedItem { @Override public int hashCode() { int hash = 37; if ( classes != null ) { hash = hash * 17 + classes.hashCode(); } else { hash = hash * 17 + getClass().getName().hashCode(); } return hash; } }
ClassesItem extends ProtectedItem { @Override public int hashCode() { int hash = 37; if ( classes != null ) { hash = hash * 17 + classes.hashCode(); } else { hash = hash * 17 + getClass().getName().hashCode(); } return hash; } ClassesItem( ExprNode classes ); }
ClassesItem extends ProtectedItem { @Override public int hashCode() { int hash = 37; if ( classes != null ) { hash = hash * 17 + classes.hashCode(); } else { hash = hash * 17 + getClass().getName().hashCode(); } return hash; } ClassesItem( ExprNode classes ); ExprNode getClasses(); @Override int hashCode(); @Override boolean equals( Object o ); @Override String toString(); }
ClassesItem extends ProtectedItem { @Override public int hashCode() { int hash = 37; if ( classes != null ) { hash = hash * 17 + classes.hashCode(); } else { hash = hash * 17 + getClass().getName().hashCode(); } return hash; } ClassesItem( ExprNode classes ); ExprNode getClasses(); @Override int hashCode(); @Override boolean equals( Object o ); @Override String toString();  }