@Test public void testHashCodeEqualsContract$null() throws Exception { ImmutableElementParameter sut = createParameter("header", "value"); assertThat(sut.equals(null),equalTo(false)); }
@Override public boolean equals(Object obj) { boolean result = false; if(obj instanceof Parameter) { Parameter that=(Parameter)obj; result= Objects.equals(this.name,that.name()) && Objects.equals(this.value,that.value()); } return result; }
ImmutableElementParameter implements Parameter { @Override public boolean equals(Object obj) { boolean result = false; if(obj instanceof Parameter) { Parameter that=(Parameter)obj; result= Objects.equals(this.name,that.name()) && Objects.equals(this.value,that.value()); } return result; } }
ImmutableElementParameter implements Parameter { @Override public boolean equals(Object obj) { boolean result = false; if(obj instanceof Parameter) { Parameter that=(Parameter)obj; result= Objects.equals(this.name,that.name()) && Objects.equals(this.value,that.value()); } return result; } ImmutableElementParameter(String name, String value); }
ImmutableElementParameter implements Parameter { @Override public boolean equals(Object obj) { boolean result = false; if(obj instanceof Parameter) { Parameter that=(Parameter)obj; result= Objects.equals(this.name,that.name()) && Objects.equals(this.value,that.value()); } return result; } ImmutableElementParameter(String name, String value); @Override String name(); @Override String value(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
ImmutableElementParameter implements Parameter { @Override public boolean equals(Object obj) { boolean result = false; if(obj instanceof Parameter) { Parameter that=(Parameter)obj; result= Objects.equals(this.name,that.name()) && Objects.equals(this.value,that.value()); } return result; } ImmutableElementParameter(String name, String value); @Override String name(); @Override String value(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }