public class StdRef<T> extends Ref<T>
Standard implementation of a Ref which holds a key and (optionally) a value.
Modifier and Type | Field and Description |
---|---|
protected Key<T> |
key
The key associated with this ref
|
protected Result<T> |
result
The value associated with the key
|
Modifier | Constructor and Description |
---|---|
protected |
StdRef()
For GWT serialization
|
|
StdRef(Key<T> key)
Create a Ref based on the key, no value initialized
|
|
StdRef(Key<T> key,
T value)
Create a Ref based on the key
|
Modifier and Type | Method and Description |
---|---|
T |
get()
Obtain the entity value associated with the key.
|
T |
getValue()
Nearly identical to get() but conforms to JavaBean conventions and returns null instead of
throwing IllegalStateException if uninitialized.
|
Key<T> |
key() |
void |
set(Result<T> result)
Explicitly sets (or resets) the value of this Ref.
|
public T get()
Ref
public T getValue()
Ref