public boolean equals(Timestamp ts) { return ts != null && getTime() == ts.getTime() && getNanos() == ts.getNanos(); }
public boolean before(Timestamp ts) { return (getTime() < ts.getTime()) || (getTime() == ts.getTime() && getNanos() < ts.getNanos()); }
public int compareTo(Timestamp o) { int sign = Long.signum(getTime() - o.getTime()); return sign == 0 ? getNanos() - o.getNanos() : sign; }
public boolean after(Timestamp ts) { return (getTime() > ts.getTime()) || (getTime() == ts.getTime() && getNanos() > ts.getNanos()); }