Package oracle.dbtools.plugin.api.types
Enum Class Primitive
- All Implemented Interfaces:
Serializable,Comparable<Primitive>,Constable
Enumerates the Java primitive types
- Since:
- 19.3.0
- Author:
- cdivilly
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanValue(Object value) Convert an object instance to a boolean valuebyteConvert an object instance to a byte valuecharConvert an object instance to a char valuedoubledoubleValue(Object value) Convert an object instance to a double valuefloatfloatValue(Object value) Convert an object instance to a float valueintConvert an object instance to an int valuefinal booleanIndicates if this value represents a primitive type.longConvert an object instance to a long valueshortshortValue(Object value) Convert an object instance to a short valueClass<?>type()This primtiive type'sClassinstancestatic PrimitiveDetermine the appropriatePrimitiveinstance for the specified typestatic PrimitiveReturns the enum constant of this class with the specified name.static Primitive[]values()Returns an array containing the constants of this enum class, in the order they are declared.wrapper()Retrieves the equivalent wrapper type for this primitive typeClass<?>The wrapper type associated with this type.
-
Enum Constant Details
-
BOOLEAN
Thebooleantype -
BYTE
Thebytetype -
CHAR
Thechartype -
DOUBLE
Thedoubletype -
FLOAT
Thefloattype -
INT
Theinttype -
LONG
Thelongtype -
REFERENCE
A reference to a non primitive type -
SHORT
Theshorttype
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
wrapper
Retrieves the equivalent wrapper type for this primitive type- Returns:
- The
PrimitiveWrappertype for this type
-
booleanValue
Convert an object instance to a boolean value- Parameters:
value- The value to cast- Returns:
- The boolean representation
-
byteValue
Convert an object instance to a byte value- Parameters:
value- The value to cast- Returns:
- The byte representation
-
charValue
Convert an object instance to a char value- Parameters:
value- The value to cast- Returns:
- The char representation
-
doubleValue
Convert an object instance to a double value- Parameters:
value- The value to cast- Returns:
- The double representation
-
floatValue
Convert an object instance to a float value- Parameters:
value- The value to cast- Returns:
- The float representation
-
intValue
Convert an object instance to an int value- Parameters:
value- The value to cast- Returns:
- The int representation
-
isPrimitive
public final boolean isPrimitive()Indicates if this value represents a primitive type.- Returns:
- false if this is an instance of
REFERENCE, true otherwise
-
longValue
Convert an object instance to a long value- Parameters:
value- The value to cast- Returns:
- The long representation
-
shortValue
Convert an object instance to a short value- Parameters:
value- The value to cast- Returns:
- The short representation
-
wrapperType
The wrapper type associated with this type. For example the wrapper type forintisInteger- Returns:
- The wrapper type for this primitive type
-
type
This primtiive type'sClassinstance- Returns:
Classinstance
-
valueOf
Determine the appropriatePrimitiveinstance for the specified type- Parameters:
type- The type to examine- Returns:
- The corresponding
Primitiveinstance
-