public class ConcurrentFloatArray extends org.mini2Dx.gdx.utils.FloatArray implements ConcurrentCollection
| Modifier and Type | Field and Description |
|---|---|
protected ReadWriteLock |
lock |
| Constructor and Description |
|---|
ConcurrentFloatArray()
Creates an ordered array with a capacity of 16.
|
ConcurrentFloatArray(boolean ordered,
float[] array,
int startIndex,
int count)
Creates a new array containing the elements in the specified array.
|
ConcurrentFloatArray(boolean ordered,
int capacity) |
ConcurrentFloatArray(float[] array)
Creates a new ordered array containing the elements in the specified array.
|
ConcurrentFloatArray(org.mini2Dx.gdx.utils.FloatArray array)
Creates a new array containing the elements in the specific array.
|
ConcurrentFloatArray(int capacity)
Creates an ordered array with the specified capacity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(float value) |
void |
add(float value1,
float value2) |
void |
add(float value1,
float value2,
float value3) |
void |
add(float value1,
float value2,
float value3,
float value4) |
void |
addAll(float[] array,
int offset,
int length) |
void |
addAll(org.mini2Dx.gdx.utils.FloatArray array,
int offset,
int length) |
void |
clear() |
boolean |
contains(float value) |
float[] |
ensureCapacity(int additionalCapacity)
Increases the size of the backing array to accommodate the specified number of additional items.
|
boolean |
equals(java.lang.Object object)
Returns false if either array is unordered.
|
boolean |
equals(java.lang.Object object,
float epsilon)
Returns false if either array is unordered.
|
float |
first()
Returns the first item.
|
float |
get(int index) |
ReadWriteLock |
getLock()
Returns the collection's
ReadWriteLock |
int |
hashCode() |
void |
incr(int index,
float value) |
int |
indexOf(float value) |
void |
insert(int index,
float value) |
boolean |
isEmpty()
Returns true if the array is empty.
|
int |
lastIndexOf(char value) |
void |
mul(int index,
float value) |
boolean |
notEmpty()
Returns true if the array has one or more items.
|
float |
peek()
Returns the last item.
|
float |
pop()
Removes and returns the last item.
|
float |
random()
Returns a random item from the array, or zero if the array is empty.
|
boolean |
removeAll(org.mini2Dx.gdx.utils.FloatArray array)
Removes from this array all of elements contained in the specified array.
|
float |
removeIndex(int index)
Removes and returns the item at the specified index.
|
void |
removeRange(int start,
int end)
Removes the items between the specified indices, inclusive.
|
boolean |
removeValue(float value) |
void |
reverse() |
void |
set(int index,
float value) |
float[] |
setSize(int newSize)
Sets the array size, leaving any values beyond the current size undefined.
|
float[] |
shrink()
Reduces the size of the backing array to the size of the actual items.
|
void |
shuffle() |
void |
sort() |
void |
swap(int first,
int second) |
float[] |
toArray() |
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String separator) |
void |
truncate(int newSize)
Reduces the size of the array to the specified size.
|
protected ReadWriteLock lock
public ConcurrentFloatArray()
public ConcurrentFloatArray(int capacity)
capacity - public ConcurrentFloatArray(boolean ordered,
int capacity)
ordered - If false, methods that remove elements may change the order of other elements in the array, which avoids a
memory copy.capacity - Any elements added beyond this will cause the backing array to be grown.public ConcurrentFloatArray(org.mini2Dx.gdx.utils.FloatArray array)
array - public ConcurrentFloatArray(float[] array)
array - public ConcurrentFloatArray(boolean ordered,
float[] array,
int startIndex,
int count)
ordered - If false, methods that remove elements may change the order of other elements in the array, which avoids a
memory copy.array - startIndex - count - public void add(float value)
add in class org.mini2Dx.gdx.utils.FloatArraypublic void add(float value1,
float value2)
add in class org.mini2Dx.gdx.utils.FloatArraypublic void add(float value1,
float value2,
float value3)
add in class org.mini2Dx.gdx.utils.FloatArraypublic void add(float value1,
float value2,
float value3,
float value4)
add in class org.mini2Dx.gdx.utils.FloatArraypublic void addAll(org.mini2Dx.gdx.utils.FloatArray array,
int offset,
int length)
addAll in class org.mini2Dx.gdx.utils.FloatArraypublic void addAll(float[] array,
int offset,
int length)
addAll in class org.mini2Dx.gdx.utils.FloatArraypublic float get(int index)
get in class org.mini2Dx.gdx.utils.FloatArraypublic void set(int index,
float value)
set in class org.mini2Dx.gdx.utils.FloatArraypublic void incr(int index,
float value)
incr in class org.mini2Dx.gdx.utils.FloatArraypublic void mul(int index,
float value)
mul in class org.mini2Dx.gdx.utils.FloatArraypublic void insert(int index,
float value)
insert in class org.mini2Dx.gdx.utils.FloatArraypublic void swap(int first,
int second)
swap in class org.mini2Dx.gdx.utils.FloatArraypublic boolean contains(float value)
contains in class org.mini2Dx.gdx.utils.FloatArraypublic int indexOf(float value)
indexOf in class org.mini2Dx.gdx.utils.FloatArraypublic int lastIndexOf(char value)
lastIndexOf in class org.mini2Dx.gdx.utils.FloatArraypublic boolean removeValue(float value)
removeValue in class org.mini2Dx.gdx.utils.FloatArraypublic float removeIndex(int index)
removeIndex in class org.mini2Dx.gdx.utils.FloatArrayindex - public void removeRange(int start,
int end)
removeRange in class org.mini2Dx.gdx.utils.FloatArraystart - end - public boolean removeAll(org.mini2Dx.gdx.utils.FloatArray array)
removeAll in class org.mini2Dx.gdx.utils.FloatArrayarray - public float pop()
pop in class org.mini2Dx.gdx.utils.FloatArraypublic float peek()
peek in class org.mini2Dx.gdx.utils.FloatArraypublic float first()
first in class org.mini2Dx.gdx.utils.FloatArraypublic boolean notEmpty()
notEmpty in class org.mini2Dx.gdx.utils.FloatArraypublic boolean isEmpty()
isEmpty in class org.mini2Dx.gdx.utils.FloatArraypublic void clear()
clear in class org.mini2Dx.gdx.utils.FloatArraypublic float[] shrink()
shrink in class org.mini2Dx.gdx.utils.FloatArrayFloatArray.itemspublic float[] ensureCapacity(int additionalCapacity)
ensureCapacity in class org.mini2Dx.gdx.utils.FloatArrayadditionalCapacity - FloatArray.itemspublic float[] setSize(int newSize)
setSize in class org.mini2Dx.gdx.utils.FloatArraynewSize - FloatArray.itemspublic void sort()
sort in class org.mini2Dx.gdx.utils.FloatArraypublic void reverse()
reverse in class org.mini2Dx.gdx.utils.FloatArraypublic void shuffle()
shuffle in class org.mini2Dx.gdx.utils.FloatArraypublic void truncate(int newSize)
truncate in class org.mini2Dx.gdx.utils.FloatArraynewSize - public float random()
random in class org.mini2Dx.gdx.utils.FloatArraypublic float[] toArray()
toArray in class org.mini2Dx.gdx.utils.FloatArraypublic int hashCode()
hashCode in class org.mini2Dx.gdx.utils.FloatArraypublic boolean equals(java.lang.Object object)
equals in class org.mini2Dx.gdx.utils.FloatArrayobject - public boolean equals(java.lang.Object object,
float epsilon)
equals in class org.mini2Dx.gdx.utils.FloatArrayobject - epsilon - public java.lang.String toString()
toString in class org.mini2Dx.gdx.utils.FloatArraypublic java.lang.String toString(java.lang.String separator)
toString in class org.mini2Dx.gdx.utils.FloatArraypublic ReadWriteLock getLock()
ConcurrentCollectionReadWriteLockgetLock in interface ConcurrentCollectionReadWriteLock