| Enum Constant and Description |
|---|
BOOLEAN
Represents a boolean.
|
BYTE
Represents a short.
|
CHAR
Represents a char.
|
DOUBLE
Represents a double.
|
FLOAT
Represents a float.
|
INT
Represents an int.
|
LONG
Represents a long.
|
OBJECT
Represents an arbitrary object.
|
SHORT
Represents a short.
|
STRING
Represents a string.
|
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Class<?> |
cls
Stores the associated class.
|
| Modifier and Type | Method and Description |
|---|---|
static ValueType |
fromObject(java.lang.Object object)
Converts an arbitrary object to a value type.
|
java.lang.Object |
read(java.io.DataInputStream in)
Reads a corresponding value from the given input stream.
|
static ValueType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ValueType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
write(java.io.DataOutputStream out,
java.lang.Object value)
Writes a corresponding value to the given input stream.
|
public static final ValueType DOUBLE
public static final ValueType FLOAT
public static final ValueType INT
public static final ValueType LONG
public static final ValueType CHAR
public static final ValueType BOOLEAN
public static final ValueType SHORT
public static final ValueType BYTE
public static final ValueType STRING
public static final ValueType OBJECT
public static ValueType[] values()
for (ValueType c : ValueType.values()) System.out.println(c);
public static ValueType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static ValueType fromObject(java.lang.Object object)
object - the object to be convertedOBJECT)public void write(java.io.DataOutputStream out,
java.lang.Object value)
throws java.io.IOException
out - the output streamvalue - a corresponding (castable) valuejava.io.IOException - in case of any I/O related errorjava.lang.ClassCastException - in case that value does not map
to the respective wrapper classespublic java.lang.Object read(java.io.DataInputStream in)
throws java.io.IOException
in - the input streamjava.io.IOException - in case of any I/O related error