T - The type of the wrapped objectpublic class ObjectWrapper<T> extends Object
final ObjectWrapper<Object> objectWrapper = new ObjectWrapper<Object>();
new Runnable() {
public void run() {
...
objectWrapper.set(someResult);
}
}.run();
Object result = objectWrapper.get();
| Constructor and Description |
|---|
ObjectWrapper() |
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Returns the wrapped object.
|
boolean |
isSet()
Returns whether the value has been set.
|
void |
set(T wrappedObject)
Sets the wrapped object.
|
public T get()
public boolean isSet()
true if the value was set, false otherwisepublic void set(T wrappedObject)
wrappedObject - The wrapped objectCopyright © 2026. All rights reserved.