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 Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final Set<Class<?>>
    The set of basic types, including their wrapper types.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isBasicType(Class<?> clazz)
    Determines whether the given class is a basic type (including wrapper types and String).
    static boolean
    Determines whether the given object is a basic type.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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