Java java.util.concurrent.atomic AtomicInteger fields, constructors, methods, implement or subclass

Example usage for Java java.util.concurrent.atomic AtomicInteger fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.concurrent.atomic AtomicInteger.

The text is from its open source code.

Constructor

AtomicInteger()
Creates a new AtomicInteger with initial value 0 .
AtomicInteger(int initialValue)
Creates a new AtomicInteger with the given initial value.

Method

intaddAndGet(int delta)
Atomically adds the given value to the current value, with memory effects as specified by VarHandle#getAndAdd .
booleancompareAndSet(int expectedValue, int newValue)
Atomically sets the value to newValue if the current value == expectedValue , with memory effects as specified by VarHandle#compareAndSet .
intdecrementAndGet()
Atomically decrements the current value, with memory effects as specified by VarHandle#getAndAdd .
doubledoubleValue()
Returns the current value of this AtomicInteger as a double after a widening primitive conversion, with memory effects as specified by VarHandle#getVolatile .
floatfloatValue()
Returns the current value of this AtomicInteger as a float after a widening primitive conversion, with memory effects as specified by VarHandle#getVolatile .
intget()
Returns the current value, with memory effects as specified by VarHandle#getVolatile .
intgetAndAdd(int delta)
Atomically adds the given value to the current value, with memory effects as specified by VarHandle#getAndAdd .
intgetAndDecrement()
Atomically decrements the current value, with memory effects as specified by VarHandle#getAndAdd .
intgetAndIncrement()
Atomically increments the current value, with memory effects as specified by VarHandle#getAndAdd .
intgetAndSet(int newValue)
Atomically sets the value to newValue and returns the old value, with memory effects as specified by VarHandle#getAndSet .
intincrementAndGet()
Atomically increments the current value, with memory effects as specified by VarHandle#getAndAdd .
intintValue()
Returns the current value of this AtomicInteger as an int , with memory effects as specified by VarHandle#getVolatile .
voidlazySet(int newValue)
Sets the value to newValue , with memory effects as specified by VarHandle#setRelease .
longlongValue()
Returns the current value of this AtomicInteger as a long after a widening primitive conversion, with memory effects as specified by VarHandle#getVolatile .
voidnotifyAll()
Wakes up all threads that are waiting on this object's monitor.
voidset(int newValue)
Sets the value to newValue , with memory effects as specified by VarHandle#setVolatile .
StringtoString()
Returns the String representation of the current value.
voidwait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
voidwait()
Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
booleanweakCompareAndSet(int expectedValue, int newValue)
Possibly atomically sets the value to newValue if the current value == expectedValue , with memory effects as specified by VarHandle#weakCompareAndSetPlain .