@Test public void testEqualsCaseInsensitiveVariableName() { final LargeSequenceConvertedToIntegerViolation first = new LargeSequenceConvertedToIntegerViolation(onVariable, null); final LargeSequenceConvertedToIntegerViolation second = new LargeSequenceConvertedToIntegerViolation( StringUtils.swapCase(onVariable), null); assertThat(first).isEqualTo(second); assertThat(second).isEqualTo(first); assertThat(first.hashCode()).isEqualTo(second.hashCode()); }
@Override public int hashCode() { return new HashCodeBuilder().append(StringUtils.lowerCase(onVariable, Locale.US)).append(getLineNumber()) .toHashCode(); }
LargeSequenceConvertedToIntegerViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(StringUtils.lowerCase(onVariable, Locale.US)).append(getLineNumber()) .toHashCode(); } }
LargeSequenceConvertedToIntegerViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(StringUtils.lowerCase(onVariable, Locale.US)).append(getLineNumber()) .toHashCode(); } LargeSequenceConvertedToIntegerViolation(final Integer lineNumber);  LargeSequenceConvertedToIntegerViolation(final String onVariable, final Integer lineNumber); }
LargeSequenceConvertedToIntegerViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(StringUtils.lowerCase(onVariable, Locale.US)).append(getLineNumber()) .toHashCode(); } LargeSequenceConvertedToIntegerViolation(final Integer lineNumber);  LargeSequenceConvertedToIntegerViolation(final String onVariable, final Integer lineNumber); @Override boolean equals(final Object obj); @Override Integer getLineNumber(); @Override String getViolationDescription(); @Override String getViolationExplanation(); @Override ViolationId getViolationId(); String getOnVariable(); @Override int hashCode(); @Override String toString(); }
LargeSequenceConvertedToIntegerViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(StringUtils.lowerCase(onVariable, Locale.US)).append(getLineNumber()) .toHashCode(); } LargeSequenceConvertedToIntegerViolation(final Integer lineNumber);  LargeSequenceConvertedToIntegerViolation(final String onVariable, final Integer lineNumber); @Override boolean equals(final Object obj); @Override Integer getLineNumber(); @Override String getViolationDescription(); @Override String getViolationExplanation(); @Override ViolationId getViolationId(); String getOnVariable(); @Override int hashCode(); @Override String toString();  }