Class BasicTypeUtil

java.lang.Object
com.ultikits.ultitools.utils.BasicTypeUtil

public final class BasicTypeUtil extends Object
Basic type determination utility class.

Replaces hutool ClassUtil.isBasicType() / ObjectUtil.isBasicType().

Since:
6.2.0
Author:
wisdomme
  • Field Details

    • BASIC_TYPES

      private static final Set<Class<?>> BASIC_TYPES
      The set of basic types, including their wrapper types.
  • Constructor Details

    • BasicTypeUtil

      private BasicTypeUtil()
  • Method Details

    • isBasicType

      public static boolean isBasicType(Class<?> clazz)
      Determines whether the given class is a basic type (including wrapper types and String).
      Parameters:
      clazz - the class
      Returns:
      whether it is a basic type
    • isBasicType

      public static boolean isBasicType(Object obj)
      Determines whether the given object is a basic type.
      Parameters:
      obj - the object
      Returns:
      whether it is a basic type