public static <T extends Comparable<T>> int safeCompare(T o1, T o2) { if(o1 != null) { return o2 == null ? 1 : compare(o1, o2); } else { return o2 == null ? 0 : -1; } }
@Override public boolean equals(Object other) { return IdentityUtils.equalsTo(this, other); }
public int compareTo(TimeStamp other) { return IdentityUtils.safeCompare(value, other.value); }