API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent.atomic. AtomicInteger View Source
Author(s)
Doug Lea
Since
1.5
Version
Serial
Hierarchy
 Object
      Number
          AtomicInteger
Implements
 Serializable
Subclasses
Description
public class AtomicInteger
  An int value that may be updated atomically.
See also:   
Constructors
public AtomicInteger ()
Creates a new AtomicInteger with initial value 0.
public AtomicInteger (int initialValue)
  Creates a new AtomicInteger with the given initial value.
Methods
Hide/Show inherited methods
publicfinal int addAndGet (int delta)
  Atomically adds the given value to the current value.
public byte byteValue () [Inherited From Number]
  Returns the value of the specified number as a byte.
publicfinal boolean compareAndSet (int expect, int update)
  Atomically sets the value to the given updated value if the current value == the expected value.
publicfinal int decrementAndGet ()
  Atomically decrements by one the current value.
public double doubleValue () [Specified in Number]
public float floatValue () [Specified in Number]
publicfinal int get ()
  Gets the current value.
publicfinal int getAndAdd (int delta)
  Atomically adds the given value to the current value.
publicfinal int getAndDecrement ()
  Atomically decrements by one the current value.
publicfinal int getAndIncrement ()
  Atomically increments by one the current value.
publicfinal int getAndSet (int newValue)
  Atomically sets to the given value and returns the old value.
publicfinal int incrementAndGet ()
  Atomically increments by one the current value.
public int intValue () [Specified in Number]
publicfinal void lazySet (int newValue)
  Eventually sets to the given value.
public long longValue () [Specified in Number]
publicfinal void set (int newValue)
  Sets to the given value.
public short shortValue () [Inherited From Number]
  Returns the value of the specified number as a short.
public String toString ()
  Returns the String representation of the current value.
publicfinal boolean weakCompareAndSet (int expect, int 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