public enum PrimitiveWrapper extends Enum<PrimitiveWrapper>
Primitive
typeEnum Constant and Description |
---|
BOOLEAN
The
Boolean type |
BYTE
The
Byte type |
CHARACTER
The
Character type |
DOUBLE
The
Double type |
FLOAT
The
Float type |
INTEGER
The
Integer type |
LONG
The
Long type |
PRIMITIVE
Denotes any
Primitive type |
REFERENCE
A non primitive type
|
SHORT
The
Short type |
Modifier and Type | Method and Description |
---|---|
boolean |
isWrapper()
Indicates if this represents a primitive wrapper type
|
Primitive |
primitive()
The corresponding
Primitive type |
Class<?> |
type()
The
Class instance for this primtive wrapper |
static PrimitiveWrapper |
valueOf(Class<?> type)
Determine the appropriate
PrimitiveWrapper for the specified type |
static PrimitiveWrapper |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PrimitiveWrapper[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared.
|
public static final PrimitiveWrapper BOOLEAN
Boolean
typepublic static final PrimitiveWrapper BYTE
Byte
typepublic static final PrimitiveWrapper CHARACTER
Character
typepublic static final PrimitiveWrapper DOUBLE
Double
typepublic static final PrimitiveWrapper FLOAT
Float
typepublic static final PrimitiveWrapper INTEGER
Integer
typepublic static final PrimitiveWrapper LONG
Long
typepublic static final PrimitiveWrapper PRIMITIVE
Primitive
typepublic static final PrimitiveWrapper REFERENCE
public static final PrimitiveWrapper SHORT
Short
typepublic static PrimitiveWrapper[] values()
for (PrimitiveWrapper c : PrimitiveWrapper.values()) System.out.println(c);
public static PrimitiveWrapper valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isWrapper()
public static PrimitiveWrapper valueOf(Class<?> type)
PrimitiveWrapper
for the specified typetype
- The type to checkPrimitiveWrapper
instance