public class Value extends Object
Modifier and Type | Field and Description |
---|---|
static Class<?> |
TYPE_BOOLEAN |
static Class<?> |
TYPE_BYTE |
static Class<?> |
TYPE_CHAR |
static Class<?> |
TYPE_DATE |
static Class<?> |
TYPE_DOUBLE |
static Class<?> |
TYPE_FLOAT |
static Class<?> |
TYPE_INTEGER |
static Class<?> |
TYPE_LONG |
static Class<?> |
TYPE_SHORT |
static Class<?> |
TYPE_STRING |
Modifier and Type | Method and Description |
---|---|
Value |
fromExternal(String external)
Set to value from the external respresentation
|
boolean |
getBoolean()
Get the boolean value.
|
byte |
getByte()
Get the byte value.
|
char |
getChar()
Get the char value.
|
Date |
getDate()
Get the Date value.
|
double |
getDouble()
Get the double value.
|
float |
getFloat()
Get the float value.
|
int |
getInt()
Get the integer value.
|
long |
getLong()
Get the long value.
|
Object |
getObject()
Get the Object value.
|
short |
getShort()
Get the short value.
|
String |
getString()
Get the String value.
|
Class<?> |
getType()
Get the Value's type
|
Value |
set(boolean val)
Set the Value's internal value to a boolean.
|
Value |
set(byte val)
Set the Value's internal value to a byte.
|
Value |
set(char val)
Set the Value's internal value to a char.
|
Value |
set(Date val)
Set the Value's internal value to a Date.
|
Value |
set(double val)
Set the Value's internal value to a double.
|
Value |
set(float val)
Set the Value's internal value to a float.
|
Value |
set(int val)
Set the Value's internal value to an integer.
|
Value |
set(long val)
Set the Value's internal value to a long.
|
Value |
set(Object val)
Set the Value's internal value to an Object.
|
Value |
set(short val)
Set the Value's internal value to a short.
|
Value |
set(String val)
Set the Value's internal value to a String.
|
Value |
setValue(Value v) |
String |
toExternal()
Returns an external representation of this value
|
String |
toString()
Get the String value.
|
public static final Class<?> TYPE_INTEGER
public static final Class<?> TYPE_SHORT
public static final Class<?> TYPE_LONG
public static final Class<?> TYPE_FLOAT
public static final Class<?> TYPE_DOUBLE
public static final Class<?> TYPE_BOOLEAN
public static final Class<?> TYPE_BYTE
public static final Class<?> TYPE_CHAR
public static final Class<?> TYPE_STRING
public static final Class<?> TYPE_DATE
public Value()
public Value(Value v)
public Class<?> getType()
public Value set(int val)
val
- The integer value.public Value set(short val)
val
- The short value.public Value set(long val)
val
- The long value.public Value set(float val)
val
- The float value.public Value set(double val)
val
- The double value.public Value set(boolean val)
val
- The boolean value.public Value set(byte val)
val
- The byte value.public Value set(char val)
val
- The char value.public Value set(String val)
val
- The String value.public Value set(Date val)
val
- The Date value.public Value set(Object val)
val
- The Object value.public int getInt()
A
- ClassCastException is thrown if this Value has incompatible type.public short getShort()
A
- ClassCastException is thrown if this Value has incompatible type.public long getLong()
A
- ClassCastException is thrown if this Value has incompatible type.public float getFloat()
A
- ClassCastException is thrown if this Value has incompatible type.public double getDouble()
A
- ClassCastException is thrown if this Value has incompatible type.public boolean getBoolean()
A
- ClassCastException is thrown if this Value has incompatible type.public byte getByte()
A
- ClassCastException is thrown if this Value has incompatible type.public char getChar()
A
- ClassCastException is thrown if this Value has incompatible type.public String getString()
public Date getDate()
A
- ClassCastException is thrown if this Value has incompatible type.public Object getObject()
public String toString()
public String toExternal()
public Value fromExternal(String external) throws IllegalArgumentException
IllegalArgumentException
Copyright © 2014. All rights reserved.