| Constructor and Description |
|---|
TypedValue(T value) |
TypedValue(T value,
Type<T> type) |
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Returns raw value ( not evaluated in case of
EvaluableType types). |
Type<?> |
getEvaluableType()
Returns type, that this value will evaluate to when calling
getEvaluatedValue()
without parameters. |
<V> V |
getEvaluatedValue()
Returns evaluated value.
|
<V> V |
getEvaluatedValue(Class<V> targetClass)
Returns value as target class.
|
Type<T> |
getType()
Returns this value type.
|
boolean |
isInstanceOf(Type<?> target)
Checks if this value is instance of specified type.
|
static <T> TypedValue<T> |
nullValue(Type<T> type)
Creates null value with given type.
|
String |
toString() |
public TypedValue(T value)
public static <T> TypedValue<T> nullValue(Type<T> type)
type - value typepublic T get()
EvaluableType types).public boolean isInstanceOf(Type<?> target)
EvaluableType.evaluatedType(Object) e.g. returns true for string if this value
is function that returns string values.target - target typegetEvaluatedValue(Class) will be instance of
specified typepublic Type<?> getEvaluableType()
getEvaluatedValue()
without parameters.public <V> V getEvaluatedValue()
EvaluableTypepublic <V> V getEvaluatedValue(Class<V> targetClass)
EvaluableType.targetClass - target classCopyright © 2017 Suncode. All rights reserved.