public boolean equals(Object other) {if (other instanceof IndexCommit) {IndexCommit otherCommit = (IndexCommit) other;return otherCommit.getDirectory() == getDirectory() && otherCommit.getGeneration() == getGeneration();} else {return false;}}
public override bool Equals(object other){if (other is IndexCommit){IndexCommit otherCommit = (IndexCommit)other;return otherCommit.Directory == Directory && otherCommit.Generation == Generation;}else{return false;}}