@Test public void testEqualsDifferentDataLengths() { final SimpleCharacterDataTyped other = new SimpleCharacterDataTyped(dataLength + 1); assertThat(dataType).isNotEqualTo(other); assertThat(other).isNotEqualTo(dataType); assertThat(other.hashCode()).isNotEqualTo(dataType.hashCode()); }
@Override public int hashCode() { return 31 * super.hashCode() + dataLength; }
SimpleCharacterDataTyped extends SimpleDataTyped implements FixedLengthDataTyped { @Override public int hashCode() { return 31 * super.hashCode() + dataLength; } }
SimpleCharacterDataTyped extends SimpleDataTyped implements FixedLengthDataTyped { @Override public int hashCode() { return 31 * super.hashCode() + dataLength; } SimpleCharacterDataTyped(final int dataLength); }
SimpleCharacterDataTyped extends SimpleDataTyped implements FixedLengthDataTyped { @Override public int hashCode() { return 31 * super.hashCode() + dataLength; } SimpleCharacterDataTyped(final int dataLength); @Override boolean equals(final Object obj); @Override int getDataLength(); @Override int hashCode(); @Override String toString(); }
SimpleCharacterDataTyped extends SimpleDataTyped implements FixedLengthDataTyped { @Override public int hashCode() { return 31 * super.hashCode() + dataLength; } SimpleCharacterDataTyped(final int dataLength); @Override boolean equals(final Object obj); @Override int getDataLength(); @Override int hashCode(); @Override String toString();  }