public int compareTo(IndexCommit commit) {if (getDirectory() != commit.getDirectory()) {throw new UnsupportedOperationException("cannot compare IndexCommits from different Directory instances");}long gen = getGeneration();long comgen = commit.getGeneration();return Long.compare(gen, comgen);}
public virtual int CompareTo(IndexCommit commit){if (Directory != commit.Directory){throw new System.NotSupportedException("cannot compare IndexCommits from different Directory instances");}long gen = Generation;long comgen = commit.Generation;if (gen < comgen){return -1;}else if (gen > comgen){return 1;}else{return 0;}}