We have the following methods:
- compare(T a, T b, Comparator c):int Returns 0 if the arguments are identical and c.compare(a, b) otherwise. Consequently, if both arguments are null 0 is returned
- deepEquals(Object a, Object b):boolean Compares objects or Arrays
- hash(Object... values):int Generates a hash code for a sequence of input values
- T nonNull(T obj) If obj is not null, return obj else throw a NullPointerException
and other useful methods.
Look for more in javadoc: http://download.oracle.com/javase/7/docs/api/java/util/Objects.html
No comments:
Post a Comment