@Test public void testEquals() { assertTrue(parameter1.equals(parameter1)); assertTrue(parameter1.equals(parameter2)); assertFalse(parameter1.equals("string")); assertFalse(parameter1.equals(null)); assertFalse(parameter1.equals(parameter3)); assertFalse(parameter2.equals(parameter4)); assertFalse(parameter4.equals(parameter2)); assertFalse(parameter3.equals(parameter2)); }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final MethodParameterImpl other = (MethodParameterImpl) obj; return Objects.equals(this.name, other.name) && Objects.equals(this.type, other.type); }
MethodParameterImpl implements Parameter { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final MethodParameterImpl other = (MethodParameterImpl) obj; return Objects.equals(this.name, other.name) && Objects.equals(this.type, other.type); } }
MethodParameterImpl implements Parameter { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final MethodParameterImpl other = (MethodParameterImpl) obj; return Objects.equals(this.name, other.name) && Objects.equals(this.type, other.type); } MethodParameterImpl(final String name, final Type type); }
MethodParameterImpl implements Parameter { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final MethodParameterImpl other = (MethodParameterImpl) obj; return Objects.equals(this.name, other.name) && Objects.equals(this.type, other.type); } MethodParameterImpl(final String name, final Type type); @Override String getName(); @Override Type getType(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); }
MethodParameterImpl implements Parameter { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final MethodParameterImpl other = (MethodParameterImpl) obj; return Objects.equals(this.name, other.name) && Objects.equals(this.type, other.type); } MethodParameterImpl(final String name, final Type type); @Override String getName(); @Override Type getType(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }