@Test public void testEquals() { final SubroutineDefinition other = new SubroutineDefinition(subroutineName, new ArrayList<String>(argumentNames)); assertThat(definition).isEqualTo(other); assertThat(other).isEqualTo(definition); assertThat(other.hashCode()).isEqualTo(definition.hashCode()); }
@Override public boolean equals(final Object obj) { if (!(obj instanceof SubroutineDefinition)) { return false; } if (obj == this) { return true; } final SubroutineDefinition other = (SubroutineDefinition) obj; return new EqualsBuilder().append(name, other.name).append(argumentNames, other.argumentNames).isEquals(); }
SubroutineDefinition { @Override public boolean equals(final Object obj) { if (!(obj instanceof SubroutineDefinition)) { return false; } if (obj == this) { return true; } final SubroutineDefinition other = (SubroutineDefinition) obj; return new EqualsBuilder().append(name, other.name).append(argumentNames, other.argumentNames).isEquals(); } }
SubroutineDefinition { @Override public boolean equals(final Object obj) { if (!(obj instanceof SubroutineDefinition)) { return false; } if (obj == this) { return true; } final SubroutineDefinition other = (SubroutineDefinition) obj; return new EqualsBuilder().append(name, other.name).append(argumentNames, other.argumentNames).isEquals(); } SubroutineDefinition(final String name, final List<String> argumentNames); }
SubroutineDefinition { @Override public boolean equals(final Object obj) { if (!(obj instanceof SubroutineDefinition)) { return false; } if (obj == this) { return true; } final SubroutineDefinition other = (SubroutineDefinition) obj; return new EqualsBuilder().append(name, other.name).append(argumentNames, other.argumentNames).isEquals(); } SubroutineDefinition(final String name, final List<String> argumentNames); @Override boolean equals(final Object obj); List<String> getArgumentNames(); String getName(); @Override int hashCode(); @Override String toString(); }
SubroutineDefinition { @Override public boolean equals(final Object obj) { if (!(obj instanceof SubroutineDefinition)) { return false; } if (obj == this) { return true; } final SubroutineDefinition other = (SubroutineDefinition) obj; return new EqualsBuilder().append(name, other.name).append(argumentNames, other.argumentNames).isEquals(); } SubroutineDefinition(final String name, final List<String> argumentNames); @Override boolean equals(final Object obj); List<String> getArgumentNames(); String getName(); @Override int hashCode(); @Override String toString();  }