Class Primitives


  • public class Primitives
    extends Object
    Constants and utilities for boxed primitives.
    • Method Detail

      • unboxedPrimitiveTypes

        public static Set<Class<?>> unboxedPrimitiveTypes()
        Gets all directly-primitive types. These are unboxed, purely-primitive types.
        Returns:
        an immutable set containing all directly-primitive types
        See Also:
        boxedTypes()
      • boxedTypes

        public static Set<Class<?>> boxedTypes()
        Gets all boxed primitive types.
        Returns:
        an immutable set containing all boxed primitive types
      • isBoxed

        public static boolean isBoxed​(@NullOr Object object)
        Checks if an object is an instance of a boxed primitive.
        Parameters:
        object - the object
        Returns:
        true if the object isn't null and its class is a boxed primitive type, otherwise false