Is there somewhere in the standard Java libraries that have a static equality function something like this?
public static <T> boolean equals(T a, T b) { if (a == null) return b == null; else if (b == null) return false; else return a.equals(b); }
I just implemented this in the new Util class, for the Util time. It seems unbelievable that it will not come as a standard library function ...
source share