Class ObjectTool

java.lang.Object
com.xxl.tool.core.ObjectTool

public class ObjectTool extends Object
Object Tool
Author:
xuxueli 2024-01-21 05:03:10
  • Constructor Details

    • ObjectTool

      public ObjectTool()
  • Method Details

    • equal

      public static boolean equal(Object a, Object b)
      Determines whether two possibly-null objects are equal. Returns:
      • true if a and b are both null.
      • true if a and b are both non-null and they are equal according to Object.equals(Object).
      • false in all other situations.
      Parameters:
      a -
      b -
      Returns:
    • isArray

      public static boolean isArray(Object obj)
      Determines whether the given object is an array.
      Parameters:
      obj - the obj is null
      Returns:
    • isEmpty

      public static boolean isEmpty(Object[] array)
      Determine whether the given array is empty:
      Parameters:
      array - the array to check
    • toString

      public static String toString(Object obj)
      Return a String representation of the specified Object.
      Parameters:
      obj - the object to build a String representation for
      Returns:
      a String representation of obj; Returns a "null" String if obj is null.
    • toString

      public static String toString(Object[] array)
      Return a String representation of the contents of the specified array.
      Parameters:
      array - the array to build a String representation for
      Returns:
      a String representation of array
    • identityToString

      public static String identityToString(Object obj)
      Return a String representation of the specified Object's identity.
      Parameters:
      obj - the object to build a String representation for
      Returns:
      the object's identity string, like "com.xxx.xxx.XxxClass@1111"
    • getIdentityHexString

      public static String getIdentityHexString(Object obj)
      Return a hex String form of an object's identity hash code.
      Parameters:
      obj - the object
      Returns:
      the object's identity code in hex notation