Package com.google.common.primitives
Class Primitives
java.lang.Object
com.google.common.primitives.Primitives
Deprecated.
The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
Contains static utility methods pertaining to primitive types and their
corresponding wrapper types.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns an immutable set of all nine primitive types (includingvoid).Deprecated.Returns an immutable set of all nine primitive-wrapper types (includingVoid).static booleanisWrapperType(Class<?> type) Deprecated.static <T> Class<T> Deprecated.Returns the corresponding primitive type oftypeif it is a wrapper type; otherwise returnstypeitself.static <T> Class<T> Deprecated.Returns the corresponding wrapper type oftypeif it is a primitive type; otherwise returnstypeitself.
-
Method Details
-
allPrimitiveTypes
Deprecated.Returns an immutable set of all nine primitive types (includingvoid). Note that a simpler way to test whether aClassinstance is a member of this set is to callClass.isPrimitive().- Since:
- 3.0
-
allWrapperTypes
Deprecated.Returns an immutable set of all nine primitive-wrapper types (includingVoid).- Since:
- 3.0
-
isWrapperType
Deprecated.- See Also:
-
wrap
Deprecated.Returns the corresponding wrapper type oftypeif it is a primitive type; otherwise returnstypeitself. Idempotent.wrap(int.class) == Integer.class wrap(Integer.class) == Integer.class wrap(String.class) == String.class -
unwrap
Deprecated.Returns the corresponding primitive type oftypeif it is a wrapper type; otherwise returnstypeitself. Idempotent.unwrap(Integer.class) == int.class unwrap(int.class) == int.class unwrap(String.class) == String.class
-