Package proguard.util

Class ObjectUtil


  • public class ObjectUtil
    extends java.lang.Object
    This 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 int compare​(java.lang.Comparable object1, java.lang.Comparable object2)
      Returns a comparison of the two given objects.
      static boolean equal​(java.lang.Object object1, java.lang.Object object2)
      Returns whether the given objects are the same.
      static int hashCode​(java.lang.Object object)
      Returns the hash code of the given object, or 0 if it is null.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ObjectUtil

        public ObjectUtil()
    • 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)