@Test public void test_hashCode() { assertThat(new TextPointerImpl(1, 2).hashCode()).isEqualTo(new TextPointerImpl(1, 2).hashCode()); assertThat(new TextPointerImpl(1, 2).hashCode()).isNotEqualTo(new TextPointerImpl(1, 3).hashCode()); }
@Override public int hashCode() { return Objects.hash(line, lineOffset); }
TextPointerImpl implements TextPointer { @Override public int hashCode() { return Objects.hash(line, lineOffset); } }
TextPointerImpl implements TextPointer { @Override public int hashCode() { return Objects.hash(line, lineOffset); } TextPointerImpl(int line, int lineOffset); }
TextPointerImpl implements TextPointer { @Override public int hashCode() { return Objects.hash(line, lineOffset); } TextPointerImpl(int line, int lineOffset); @Override int line(); @Override int lineOffset(); @Override int compareTo(TextPointer other); @Override boolean equals(Object o); @Override int hashCode(); }
TextPointerImpl implements TextPointer { @Override public int hashCode() { return Objects.hash(line, lineOffset); } TextPointerImpl(int line, int lineOffset); @Override int line(); @Override int lineOffset(); @Override int compareTo(TextPointer other); @Override boolean equals(Object o); @Override int hashCode();  }