public class ValueHolder<T> extends Object
up front
or once at some point
after
declaration.
Note: If a Serializable class has a ValueHolder
property, that property should be declared transient!Modifier and Type | Class and Description |
---|---|
static interface |
ValueHolder.DeferredInitializer<T>
The snippet that generates the initialization value.
|
Constructor and Description |
---|
ValueHolder(T value) |
ValueHolder(ValueHolder.DeferredInitializer<T> valueInitializer)
Instantiates a
ValueHolder with the specified initializer. |
public ValueHolder(ValueHolder.DeferredInitializer<T> valueInitializer)
ValueHolder
with the specified initializer.valueInitializer
- The initializer to use in getValue()
when value not yet known.public ValueHolder(T value)
public T getValue()
Copyright © 2019 JBoss by Red Hat. All rights reserved.