@Test public void test_hashCode() { assertThat(new LocationInFileImpl("f1", 1, 2, 3, 4).hashCode()) .isEqualTo(new LocationInFileImpl("f1", 1, 2, 3, 4).hashCode()) .isNotEqualTo(new LocationInFileImpl("f2", 1, 2, 3, 4).hashCode()) .isNotEqualTo(new LocationInFileImpl("f1", 9, 2, 3, 4).hashCode()) .isNotEqualTo(new LocationInFileImpl("f1", 1, 9, 3, 4).hashCode()) .isNotEqualTo(new LocationInFileImpl("f1", 1, 2, 9, 4).hashCode()) .isNotEqualTo(new LocationInFileImpl("f1", 1, 2, 3, 9).hashCode()); }
@Override public int hashCode() { return Objects.hash(filePath, startLine, startLineOffset, endLine, endLineOffset); }
LocationInFileImpl implements LocationInFile { @Override public int hashCode() { return Objects.hash(filePath, startLine, startLineOffset, endLine, endLineOffset); } }
LocationInFileImpl implements LocationInFile { @Override public int hashCode() { return Objects.hash(filePath, startLine, startLineOffset, endLine, endLineOffset); } LocationInFileImpl(String filePath, int startLine, int startLineOffset, int endLine, int endLineOffset); }
LocationInFileImpl implements LocationInFile { @Override public int hashCode() { return Objects.hash(filePath, startLine, startLineOffset, endLine, endLineOffset); } LocationInFileImpl(String filePath, int startLine, int startLineOffset, int endLine, int endLineOffset); @Override String filePath(); @Override int startLine(); @Override int startLineOffset(); @Override int endLine(); @Override int endLineOffset(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
LocationInFileImpl implements LocationInFile { @Override public int hashCode() { return Objects.hash(filePath, startLine, startLineOffset, endLine, endLineOffset); } LocationInFileImpl(String filePath, int startLine, int startLineOffset, int endLine, int endLineOffset); @Override String filePath(); @Override int startLine(); @Override int startLineOffset(); @Override int endLine(); @Override int endLineOffset(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }