@Test public void testEquals() throws Exception { BindingParameter bp = BindingParameter.create("a", "b", null); BindingParameter bp2 = BindingParameter.create("a", "b", null); assertThat(bp.equals(bp2), equalTo(true)); assertThat(bp.equals(null), equalTo(false)); assertThat(bp.equals(new Object()), equalTo(false)); }
@Override public boolean equals(Object obj) { if (obj == null) return false; if (getClass() != obj.getClass()) return false; final BindingParameter other = (BindingParameter) obj; return Objects.equal(this.getParameterName(), other.getParameterName()) && Objects.equal(this.getPropertyPath(), other.getPropertyPath()) && Objects.equal(this.getJdbcType(), other.getJdbcType()); }
BindingParameter { @Override public boolean equals(Object obj) { if (obj == null) return false; if (getClass() != obj.getClass()) return false; final BindingParameter other = (BindingParameter) obj; return Objects.equal(this.getParameterName(), other.getParameterName()) && Objects.equal(this.getPropertyPath(), other.getPropertyPath()) && Objects.equal(this.getJdbcType(), other.getJdbcType()); } }
BindingParameter { @Override public boolean equals(Object obj) { if (obj == null) return false; if (getClass() != obj.getClass()) return false; final BindingParameter other = (BindingParameter) obj; return Objects.equal(this.getParameterName(), other.getParameterName()) && Objects.equal(this.getPropertyPath(), other.getPropertyPath()) && Objects.equal(this.getJdbcType(), other.getJdbcType()); } BindingParameter(String parameterName, String propertyPath, JdbcType jdbcType); }
BindingParameter { @Override public boolean equals(Object obj) { if (obj == null) return false; if (getClass() != obj.getClass()) return false; final BindingParameter other = (BindingParameter) obj; return Objects.equal(this.getParameterName(), other.getParameterName()) && Objects.equal(this.getPropertyPath(), other.getPropertyPath()) && Objects.equal(this.getJdbcType(), other.getJdbcType()); } BindingParameter(String parameterName, String propertyPath, JdbcType jdbcType); static BindingParameter create(String parameterName, String propertyPath, JdbcType jdbcType); BindingParameter rightShift(); String getParameterName(); String getPropertyPath(); JdbcType getJdbcType(); String getFullName(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
BindingParameter { @Override public boolean equals(Object obj) { if (obj == null) return false; if (getClass() != obj.getClass()) return false; final BindingParameter other = (BindingParameter) obj; return Objects.equal(this.getParameterName(), other.getParameterName()) && Objects.equal(this.getPropertyPath(), other.getPropertyPath()) && Objects.equal(this.getJdbcType(), other.getJdbcType()); } BindingParameter(String parameterName, String propertyPath, JdbcType jdbcType); static BindingParameter create(String parameterName, String propertyPath, JdbcType jdbcType); BindingParameter rightShift(); String getParameterName(); String getPropertyPath(); JdbcType getJdbcType(); String getFullName(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }