Class Holder<T>

java.lang.Object
org.ros.concurrent.Holder<T>

public class Holder<T> extends Object
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)