RevisionVector implements Iterable<Revision>, Comparable<RevisionVector>, CacheValue { public boolean isRevisionNewer(@NotNull Revision revision) { checkNotNull(revision); for (Revision r : revisions) { if (r.getClusterId() == revision.getClusterId()) { return r.compareRevisionTime(revision) < 0; } else if (r.getClusterId() > revision.getClusterId()) { break; } } return true; } private  RevisionVector(@NotNull Revision[] revisions,
                           boolean checkUniqueClusterIds,
                           boolean sort);  RevisionVector(@NotNull Revision... revisions);  RevisionVector(@NotNull Iterable<Revision> revisions);  RevisionVector(@NotNull Set<Revision> revisions); RevisionVector update(@NotNull Revision revision); RevisionVector remove(int clusterId); RevisionVector pmin(@NotNull RevisionVector vector); RevisionVector pmax(@NotNull RevisionVector vector); RevisionVector difference(RevisionVector vector); boolean isRevisionNewer(@NotNull Revision revision); boolean isBranch(); @NotNull Revision getBranchRevision(); Revision getRevision(int clusterId); String asString(); StringBuilder toStringBuilder(StringBuilder sb); static RevisionVector fromString(String s); RevisionVector asTrunkRevision(); RevisionVector asBranchRevision(int clusterId); int getDimensions(); @Override int getMemory(); @Override int compareTo(@NotNull RevisionVector other); @Override Iterator<Revision> iterator(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void isNewer() { Revision rev1 = new Revision(1, 0, 1); Revision rev2 = new Revision(1, 0, 2); Revision rev3 = new Revision(1, 0, 3); RevisionVector rv = new RevisionVector(rev1, rev2); assertFalse(rv.isRevisionNewer(rev1)); assertFalse(rv.isRevisionNewer(rev2)); assertTrue(rv.isRevisionNewer(rev3)); assertTrue(rv.isRevisionNewer(new Revision(2, 0, 1))); assertTrue(rv.isRevisionNewer(new Revision(2, 0, 2))); assertFalse(rv.isRevisionNewer(new Revision(0, 0, 1))); assertFalse(rv.isRevisionNewer(new Revision(0, 0, 2))); }