@Test public void testEqualsDifferentDescription() { final AbstractParentRecordStructureMember other = new ConcreteStructure(name, 1, StringUtils.reverse(description), children); assertThat(list).isEqualTo(other); assertThat(other).isEqualTo(list); assertThat(list.hashCode()).isEqualTo(other.hashCode()); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + children.hashCode(); result = prime * result + name.toLowerCase(Locale.getDefault()).hashCode(); return result; }
AbstractParentRecordStructureMember implements HierarchicalRecordStructureMember { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + children.hashCode(); result = prime * result + name.toLowerCase(Locale.getDefault()).hashCode(); return result; } }
AbstractParentRecordStructureMember implements HierarchicalRecordStructureMember { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + children.hashCode(); result = prime * result + name.toLowerCase(Locale.getDefault()).hashCode(); return result; } AbstractParentRecordStructureMember(final String name, final int level, final String description,
            final List<? extends RecordStructureMember> children); }
AbstractParentRecordStructureMember implements HierarchicalRecordStructureMember { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + children.hashCode(); result = prime * result + name.toLowerCase(Locale.getDefault()).hashCode(); return result; } AbstractParentRecordStructureMember(final String name, final int level, final String description,
            final List<? extends RecordStructureMember> children); @Override boolean equals(final Object obj); @SuppressWarnings("unchecked") T getChildMember(final int index); int getChildMemberCount(); @Override String getDescription(); @Override int getLevel(); @Override String getName(); @Override int hashCode(); @Override String toString(); }
AbstractParentRecordStructureMember implements HierarchicalRecordStructureMember { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + children.hashCode(); result = prime * result + name.toLowerCase(Locale.getDefault()).hashCode(); return result; } AbstractParentRecordStructureMember(final String name, final int level, final String description,
            final List<? extends RecordStructureMember> children); @Override boolean equals(final Object obj); @SuppressWarnings("unchecked") T getChildMember(final int index); int getChildMemberCount(); @Override String getDescription(); @Override int getLevel(); @Override String getName(); @Override int hashCode(); @Override String toString();  }