Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
org.ros.concurrent.Holder< T > Class Reference

List of all members.

Public Member Functions

void await () throws InterruptedException
boolean await (long timeout, TimeUnit unit) throws InterruptedException
boolean equals (Object obj)
get ()
set (T value)

Static Public Member Functions

static< T > Holder< T > newEmpty ()

Private Member Functions

 Holder ()

Private Attributes

final CountDownLatch latch
value

Detailed Description

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)

Definition at line 39 of file Holder.java.


Constructor & Destructor Documentation

org.ros.concurrent.Holder< T >.Holder ( ) [inline, private]

Definition at line 49 of file Holder.java.


Member Function Documentation

void org.ros.concurrent.Holder< T >.await ( ) throws InterruptedException [inline]

Definition at line 66 of file Holder.java.

boolean org.ros.concurrent.Holder< T >.await ( long  timeout,
TimeUnit  unit 
) throws InterruptedException [inline]

Definition at line 70 of file Holder.java.

boolean org.ros.concurrent.Holder< T >.equals ( Object  obj) [inline]

Definition at line 75 of file Holder.java.

T org.ros.concurrent.Holder< T >.get ( ) [inline]

Definition at line 61 of file Holder.java.

static <T> Holder<T> org.ros.concurrent.Holder< T >.newEmpty ( ) [inline, static]

Definition at line 45 of file Holder.java.

T org.ros.concurrent.Holder< T >.set ( value) [inline]

Definition at line 54 of file Holder.java.


Member Data Documentation

final CountDownLatch org.ros.concurrent.Holder< T >.latch [private]

Definition at line 41 of file Holder.java.

T org.ros.concurrent.Holder< T >.value [private]

Definition at line 43 of file Holder.java.


The documentation for this class was generated from the following file:


rosjava_core
Author(s):
autogenerated on Wed Aug 26 2015 16:06:50