Class Primitives


  • public final class Primitives
    extends Object
    Static utility methods related to Java primitive types.
    • Method Detail

      • isPrimitiveOrString

        public static boolean isPrimitiveOrString​(Class<?> type)
        Returns true if the type is considered as a Java primitive type, or its boxed equivalent, or a String type.
        Parameters:
        type - the type to check
        Returns:
        true if the type is considered as a primitive type.
      • isBoxed

        public static boolean isBoxed​(Class<?> type)
        Returns true if the type is a boxed Java primitive type.
        Parameters:
        type - the type to check
        Returns:
        true if the type is a boxed Java primitive type
      • isPrimitive

        public static boolean isPrimitive​(Class<?> type)
        Returns true if the type is a Java primitive type.
        Parameters:
        type - the type to check
        Returns:
        true if the type is a Java primitive type