T
- Type of object to hold.public class ObjectHolder<T> extends Object implements Supplier<T>, Consumer<T>
Constructor and Description |
---|
ObjectHolder()
Constructor
|
ObjectHolder(T value)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
apply(T value)
Applies this function to
input |
T |
get()
Retrieves an instance of the appropriate type.
|
String |
toString() |
public ObjectHolder(T value)
value
- initial valuepublic ObjectHolder()
public T get()
Supplier
public void apply(T value)
Consumer
input
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.