| Constructor Summary |
|---|
|
Creates a new AtomicInteger with the given initial value. |
|
Creates a new AtomicInteger with initial value 0 . |
| Method Summary | |
|---|---|
| final int |
Atomically adds the given value to the current value. |
| final boolean |
Atomically sets the value to the given updated value if the current value == the expected value. |
| final int |
Atomically decrements by one the current value. |
| double |
No description provided. |
| float |
No description provided. |
| final int |
Gets the current value. |
| final int |
Atomically adds the given value to the current value. |
| final int |
Atomically decrements by one the current value. |
| final int |
Atomically increments by one the current value. |
| final int |
Atomically sets to the given value and returns the old value. |
| final int |
Atomically increments by one the current value. |
| int |
No description provided. |
| final void |
Eventually sets to the given value. |
| long |
No description provided. |
| final void |
Sets to the given value. |
| String |
Returns the String representation of the current value. |
| final boolean |
Atomically sets the value to the given updated value if the current value == the expected value. |
| Methods inherited from java.langNumber |
|---|
| Methods inherited from java.langObject |
|---|
public AtomicInteger
(
int
initialValue
)
public AtomicInteger
(
)
public final
int
addAndGet
(
int
delta
)
public final
boolean
compareAndSet
(
int
expect,
int
update
)
public final
int
decrementAndGet
(
)
public
double
doubleValue
(
)
public
float
floatValue
(
)
public final
int
getAndAdd
(
int
delta
)
public final
int
getAndDecrement
(
)
public final
int
getAndIncrement
(
)
public final
int
getAndSet
(
int
newValue
)
public final
int
incrementAndGet
(
)
public
int
intValue
(
)
public final
void
lazySet
(
int
newValue
)
public
long
longValue
(
)
public final
boolean
weakCompareAndSet
(
int
expect,
int
update
)
May fail spuriously and does not provide ordering guarantees, so is only rarely an appropriate alternative to compareAndSet .