API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent.atomic. AtomicIntegerArray View Source
Author(s)
Doug Lea
Since
1.5
Version
Serial
Hierarchy
 Object
      AtomicIntegerArray
Implements
 Serializable
Subclasses
Description
public class AtomicIntegerArray
  An int array in which elements may be updated atomically.
See also:   
Constructors
public AtomicIntegerArray (int length)
  Creates a new AtomicIntegerArray of given length.
public AtomicIntegerArray (int[] array)
  Creates a new AtomicIntegerArray with the same length as, and all elements copied from, the given array.
Methods
Hide/Show inherited methods
publicfinal int addAndGet (int i, int delta)
  Atomically adds the given value to the element at index i.
publicfinal boolean compareAndSet (int i, int expect, int update)
  Atomically sets the element at position i to the given updated value if the current value == the expected value.
publicfinal int decrementAndGet (int i)
  Atomically decrements by one the element at index i.
publicfinal int get (int i)
  Gets the current value at position i.
publicfinal int getAndAdd (int i, int delta)
  Atomically adds the given value to the element at index i.
publicfinal int getAndDecrement (int i)
  Atomically decrements by one the element at index i.
publicfinal int getAndIncrement (int i)
  Atomically increments by one the element at index i.
publicfinal int getAndSet (int i, int newValue)
  Atomically sets the element at position i to the given value and returns the old value.
publicfinal int incrementAndGet (int i)
  Atomically increments by one the element at index i.
publicfinal void lazySet (int i, int newValue)
  Eventually sets the element at position i to the given value.
publicfinal int length ()
  Returns the length of the array.
publicfinal void set (int i, int newValue)
  Sets the element at position i to the given value.
public String toString ()
  Returns the String representation of the current values of array.
publicfinal boolean weakCompareAndSet (int i, int expect, int update)
  Atomically sets the element at position i 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