@Test public void testEquals() { final SubroutineArgumentDeclaration first = new SubroutineArgumentDeclaration("an_arg", DataType.F8); final SubroutineArgumentDeclaration other = new SubroutineArgumentDeclaration(first.getName(), first.getDataType()); assertThat(first).isEqualTo(other); assertThat(other).isEqualTo(first); assertThat(first.hashCode()).isEqualTo(other.hashCode()); }
@Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof SubroutineArgumentDeclaration)) { return false; } final SubroutineArgumentDeclaration other = (SubroutineArgumentDeclaration) obj; return new EqualsBuilder().append(name, other.name).append(dataType, other.dataType) .append(isByRef, other.isByRef).isEquals(); }
SubroutineArgumentDeclaration implements DataTyped { @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof SubroutineArgumentDeclaration)) { return false; } final SubroutineArgumentDeclaration other = (SubroutineArgumentDeclaration) obj; return new EqualsBuilder().append(name, other.name).append(dataType, other.dataType) .append(isByRef, other.isByRef).isEquals(); } }
SubroutineArgumentDeclaration implements DataTyped { @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof SubroutineArgumentDeclaration)) { return false; } final SubroutineArgumentDeclaration other = (SubroutineArgumentDeclaration) obj; return new EqualsBuilder().append(name, other.name).append(dataType, other.dataType) .append(isByRef, other.isByRef).isEquals(); } SubroutineArgumentDeclaration(final String name);  SubroutineArgumentDeclaration(final String name, final DataType dataType);  SubroutineArgumentDeclaration(final String name, final boolean isByRef, final DataType dataType); }
SubroutineArgumentDeclaration implements DataTyped { @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof SubroutineArgumentDeclaration)) { return false; } final SubroutineArgumentDeclaration other = (SubroutineArgumentDeclaration) obj; return new EqualsBuilder().append(name, other.name).append(dataType, other.dataType) .append(isByRef, other.isByRef).isEquals(); } SubroutineArgumentDeclaration(final String name);  SubroutineArgumentDeclaration(final String name, final DataType dataType);  SubroutineArgumentDeclaration(final String name, final boolean isByRef, final DataType dataType); @Override boolean equals(final Object obj); @Override DataType getDataType(); String getName(); @Override int hashCode(); boolean isByRef(); @Override String toString(); }
SubroutineArgumentDeclaration implements DataTyped { @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof SubroutineArgumentDeclaration)) { return false; } final SubroutineArgumentDeclaration other = (SubroutineArgumentDeclaration) obj; return new EqualsBuilder().append(name, other.name).append(dataType, other.dataType) .append(isByRef, other.isByRef).isEquals(); } SubroutineArgumentDeclaration(final String name);  SubroutineArgumentDeclaration(final String name, final DataType dataType);  SubroutineArgumentDeclaration(final String name, final boolean isByRef, final DataType dataType); @Override boolean equals(final Object obj); @Override DataType getDataType(); String getName(); @Override int hashCode(); boolean isByRef(); @Override String toString();  }