@Test public void not_equal_revision() { BranchAndRevision bar1 = new BranchAndRevision(DEFAULT_BRANCH, new Revision()); BranchAndRevision rev2 = new BranchAndRevision(DEFAULT_BRANCH, new Revision()); assertThat(bar1).isNotEqualTo(rev2); assertThat(bar1.hashCode()).isNotEqualTo(rev2.hashCode()); }
@Override public int hashCode() { int hashCode = revision.hashCode(); return 31*hashCode + branch.hashCode(); }
BranchAndRevision implements Comparable<BranchAndRevision> { @Override public int hashCode() { int hashCode = revision.hashCode(); return 31*hashCode + branch.hashCode(); } }
BranchAndRevision implements Comparable<BranchAndRevision> { @Override public int hashCode() { int hashCode = revision.hashCode(); return 31*hashCode + branch.hashCode(); } BranchAndRevision(VersionNode<?, ?, ?> versionNode);  BranchAndRevision(String branch, Revision revision); }
BranchAndRevision implements Comparable<BranchAndRevision> { @Override public int hashCode() { int hashCode = revision.hashCode(); return 31*hashCode + branch.hashCode(); } BranchAndRevision(VersionNode<?, ?, ?> versionNode);  BranchAndRevision(String branch, Revision revision); static BranchAndRevision min(String branch); static BranchAndRevision max(String branch); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(BranchAndRevision other); @Override String toString(); }
BranchAndRevision implements Comparable<BranchAndRevision> { @Override public int hashCode() { int hashCode = revision.hashCode(); return 31*hashCode + branch.hashCode(); } BranchAndRevision(VersionNode<?, ?, ?> versionNode);  BranchAndRevision(String branch, Revision revision); static BranchAndRevision min(String branch); static BranchAndRevision max(String branch); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(BranchAndRevision other); @Override String toString(); final String branch; final Revision revision; }