java.lang.Object | |
↳ | java.util.concurrent.atomic.AtomicIntegerArray |
An int array in which elements may be updated atomically. See the java.util.concurrent.atomic package specification for description of the properties of atomic variables.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new AtomicIntegerArray of given length.
| |||||||||||
Create a new AtomicIntegerArray with the same length as, and
all elements copied from, the given array.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Atomically add the given value to element at index i.
| |||||||||||
Atomically set the value to the given updated value
if the current value == the expected value.
| |||||||||||
Atomically decrement by one the element at index i.
| |||||||||||
Get the current value at position i.
| |||||||||||
Atomically add the given value to element at index i.
| |||||||||||
Atomically decrement by one the element at index i.
| |||||||||||
Atomically increment by one the element at index i.
| |||||||||||
Set the element at position i to the given value and return the
old value.
| |||||||||||
Atomically increment by one the element at index i.
| |||||||||||
Returns the length of the array.
| |||||||||||
Set the element at position i to the given value.
| |||||||||||
Returns the String representation of the current values of array.
| |||||||||||
Atomically set the value to the given updated value
if the current value == the expected value.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
Create a new AtomicIntegerArray of given length.
length | the length of the array |
---|
Create a new AtomicIntegerArray with the same length as, and all elements copied from, the given array.
array | the array to copy elements from |
---|
NullPointerException | if array is null |
---|
Atomically add the given value to element at index i.
i | the index |
---|---|
delta | the value to add |
Atomically set the value to the given updated value if the current value == the expected value.
i | the index |
---|---|
expect | the expected value |
update | the new value |
Atomically decrement by one the element at index i.
i | the index |
---|
Get the current value at position i.
i | the index |
---|
Atomically add the given value to element at index i.
i | the index |
---|---|
delta | the value to add |
Atomically decrement by one the element at index i.
i | the index |
---|
Atomically increment by one the element at index i.
i | the index |
---|
Set the element at position i to the given value and return the old value.
i | the index |
---|---|
newValue | the new value |
Atomically increment by one the element at index i.
i | the index |
---|
Returns the length of the array.
Set the element at position i to the given value.
i | the index |
---|---|
newValue | the new value |
Returns the String representation of the current values of array.
Atomically set the value to the given updated value if the current value == the expected value. May fail spuriously.
i | the index |
---|---|
expect | the expected value |
update | the new value |