Package proguard.util
Class ObjectUtil
- java.lang.Object
-
- proguard.util.ObjectUtil
-
public class ObjectUtil extends java.lang.ObjectThis class contains utility methods operating on instances.
-
-
Constructor Summary
Constructors Constructor Description ObjectUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcompare(java.lang.Comparable object1, java.lang.Comparable object2)Returns a comparison of the two given objects.static booleanequal(java.lang.Object object1, java.lang.Object object2)Returns whether the given objects are the same.static inthashCode(java.lang.Object object)Returns the hash code of the given object, or 0 if it is null.
-
-
-
Method Detail
-
equal
public static boolean equal(java.lang.Object object1, java.lang.Object object2)Returns whether the given objects are the same.- Parameters:
object1- the first object, may be null.object2- the second object, may be null.- Returns:
- whether the objects are the same.
-
hashCode
public static int hashCode(java.lang.Object object)
Returns the hash code of the given object, or 0 if it is null.- Parameters:
object- the object, may be null.- Returns:
- the hash code.
-
compare
public static int compare(java.lang.Comparable object1, java.lang.Comparable object2)Returns a comparison of the two given objects.- Parameters:
object1- the first object, may be null.object2- the second object, may be null.- Returns:
- -1, 0, or 1.
- See Also:
Comparable.compareTo(Object)
-
-