public static class Atomic.Integer
An int
record that may be updated atomically. An Atomic@Integer
is used in applications such as atomically incremented counters, and cannot be used as a replacement for an java.lang.Integer. However, this class does extend Number
to allow uniform access by tools and utilities that deal with numerically-based classes.
Constructor and Description |
---|
Integer() |
Modifier and Type | Method and Description |
---|---|
int |
addAndGet()
Atomically adds the given value to the current value.
|
boolean |
compareAndSet()
Atomically sets the value to the given updated value if the current value
== the expected value. |
int |
decrementAndGet()
Atomically decrements by one the current value.
|
double |
doubleValue() |
float |
floatValue() |
int |
get()
Gets the current value.
|
int |
getAndAdd()
Atomically adds the given value to the current value.
|
int |
getAndDecrement()
Atomically decrements by one the current value.
|
int |
getAndIncrement()
Atomically increments by one the current value.
|
int |
getAndSet()
Atomically sets to the given value and returns the old value.
|
long |
getRecid() |
int |
incrementAndGet()
Atomically increments by one the current value.
|
int |
intValue() |
long |
longValue() |
void |
set()
Sets to the given value.
|
java.lang.String |
toString()
Returns the String representation of the current value.
|
public Store store
public long recid
public long getRecid()
public int get()
Gets the current value.
public void set()
Sets to the given value.
public int getAndSet()
Atomically sets to the given value and returns the old value.
public boolean compareAndSet()
Atomically sets the value to the given updated value if the current value ==
the expected value.
public int getAndIncrement()
Atomically increments by one the current value.
public int getAndDecrement()
Atomically decrements by one the current value.
public int getAndAdd()
Atomically adds the given value to the current value.
public int incrementAndGet()
Atomically increments by one the current value.
public int decrementAndGet()
Atomically decrements by one the current value.
public int addAndGet()
Atomically adds the given value to the current value.
public java.lang.String toString()
Returns the String representation of the current value.
public int intValue()
public long longValue()
public float floatValue()
public double doubleValue()