@Test public void testEqualsCaseInsensitiveFieldName() { final HeadOrFootSectionWithoutOrderClauseViolation first = createViolation(lineNumber); final HeadOrFootSectionWithoutOrderClauseViolation second = new HeadOrFootSectionWithoutOrderClauseViolation( StringUtils.swapCase(fieldName), lineNumber); assertThat(first).isEqualTo(second); assertThat(second).isEqualTo(first); assertThat(first.hashCode()).isEqualTo(second.hashCode()); }
@Override public int hashCode() { return new HashCodeBuilder().append(headFootOn.toLowerCase(Locale.US)).append(lineNumber).toHashCode(); }
HeadOrFootSectionWithoutOrderClauseViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(headFootOn.toLowerCase(Locale.US)).append(lineNumber).toHashCode(); } }
HeadOrFootSectionWithoutOrderClauseViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(headFootOn.toLowerCase(Locale.US)).append(lineNumber).toHashCode(); } HeadOrFootSectionWithoutOrderClauseViolation(final String headerOrFooterField, final Integer lineNumber); }
HeadOrFootSectionWithoutOrderClauseViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(headFootOn.toLowerCase(Locale.US)).append(lineNumber).toHashCode(); } HeadOrFootSectionWithoutOrderClauseViolation(final String headerOrFooterField, final Integer lineNumber); @Override boolean equals(final Object obj); String getHeaderOrFooterField(); @Override Integer getLineNumber(); @Override String getViolationDescription(); @Override String getViolationExplanation(); @Override ViolationId getViolationId(); @Override int hashCode(); @Override String toString(); }
HeadOrFootSectionWithoutOrderClauseViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(headFootOn.toLowerCase(Locale.US)).append(lineNumber).toHashCode(); } HeadOrFootSectionWithoutOrderClauseViolation(final String headerOrFooterField, final Integer lineNumber); @Override boolean equals(final Object obj); String getHeaderOrFooterField(); @Override Integer getLineNumber(); @Override String getViolationDescription(); @Override String getViolationExplanation(); @Override ViolationId getViolationId(); @Override int hashCode(); @Override String toString();  }