public class Holder<T>
extends java.lang.Object
Holder
s are intended for receiving a result from an anonymous class.
Note that Holder
is not thread safe. For a thread safe
implementation, use AtomicReference
. Also note that two different
Holder
instances are never considered equal.
public static <T> Holder<T> newEmpty()
public T get()
public void await() throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean await(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object