Package org.ros.concurrent
Class Holder<T>
java.lang.Object
org.ros.concurrent.Holder<T>
A mutable object that may contain a value to another object. It is modifiable
exactly once and must hold a non-null value when the value is inspected.
Holders 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.
- Author:
- damonkohler@google.com (Damon Kohler)
-
Method Summary
-
Method Details
-
newEmpty
-
set
-
get
-
await
- Throws:
InterruptedException
-
await
- Throws:
InterruptedException
-
equals
-