What methods should go into a java.util.Objects class in JDK 7?
straxus at gmail.com
Fri Sep 11 14:39:11 UTC 2009
> For JDK 7, I think it is high-time the platform included a class like
> java.util.Objects to hold commonly-written utility methods. For
> example, a two-argument static equals method that returned true if
> arguments are null, returns false is one argument is null, and
> returns the result of calling arg1.equals(arg2) (6797535 "Add shared
> two argument static equals method to the platform").
> A static hashCode method returning 0 for null and the value of
> arg.hashCode() has also been suggested.
> A set of
> static int compareTo(int, int)
> static int compareTo(long, long)
> methods probably belongs somewhere in the platform too.
> What other utility methods would have broad enough use and
> to go into a common java.util class?
As a note, I've just put up an article about this on InfoQ soliciting
feedback from the wider Java community:
More information about the core-libs-dev