API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent.atomic. AtomicReference View Source
Author(s)
Doug Lea
Since
1.5
Version
Serial
Hierarchy
 Object
      AtomicReference
Implements
 Serializable
Subclasses
Description
public class AtomicReference
  An object reference that may be updated atomically.
See also:   
Constructors
public AtomicReference ()
Creates a new AtomicReference with null initial value.
public AtomicReference ( V initialValue)
  Creates a new AtomicReference with the given initial value.
Methods
Hide/Show inherited methods
publicfinal boolean compareAndSet ( V expect, V update)
  Atomically sets the value to the given updated value if the current value == the expected value.
publicfinal V get ()
  Gets the current value.
publicfinal V getAndSet ( V newValue)
  Atomically sets to the given value and returns the old value.
publicfinal void lazySet ( V newValue)
  Eventually sets to the given value.
publicfinal void set ( V newValue)
  Sets to the given value.
public String toString ()
  Returns the String representation of the current value.
publicfinal boolean weakCompareAndSet ( V expect, V update)
  Atomically sets the value to the given updated value if the current value == the expected value.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar