|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.concurrent.atomic.AtomicReference<T>
edu.rice.cs.plt.concurrent.ConcurrentBox<T>
public class ConcurrentBox<T>
A thread-safe box implementation. Extends AtomicReference so that it can be treated as a
Box.
As a wrapper for arbitrary objects, instances of this class will serialize without error only if the wrapped object is serializable.
| Constructor Summary | |
|---|---|
ConcurrentBox()
Create a box initialized with null |
|
ConcurrentBox(T val)
Create a box initialized with val |
|
| Method Summary | ||
|---|---|---|
static
|
make()
Call the constructor (allows T to be inferred) |
|
static
|
make(T val)
Call the constructor (allows T to be inferred) |
|
T |
value()
|
|
| Methods inherited from class java.util.concurrent.atomic.AtomicReference |
|---|
compareAndSet, get, getAndSet, lazySet, set, toString, weakCompareAndSet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.rice.cs.plt.lambda.Box |
|---|
set |
| Constructor Detail |
|---|
public ConcurrentBox(T val)
val
public ConcurrentBox()
null
| Method Detail |
|---|
public T value()
value in interface Thunk<T>public static <T> ConcurrentBox<T> make(T val)
T to be inferred)
public static <T> ConcurrentBox<T> make()
T to be inferred)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||