| Modifier and Type | Field and Description |
|---|---|
| public float[] | |
| public boolean | |
| public int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | FloatArray(boolean
If false, methods that remove elements may change the order of other elements in the array, which avoids a
memory copy. ordered, int Any elements added beyond this will cause the backing array to be grown. capacity)
|
| public | |
| public | FloatArray(float[] array)
Creates a new ordered array containing the elements in the specified array. |
| public | FloatArray(boolean
If false, methods that remove elements may change the order of other elements in the array, which avoids a
memory copy. ordered, float[] array, int startIndex, int count)Creates a new array containing the elements in the specified array. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean | |
| public float[] | Returns: itemsIncreases the size of the backing array to accommodate the specified number of additional items. |
| public boolean | |
| public boolean | |
| public float | |
| public float | |
| public int | |
| public void | |
| public void | |
| public int | |
| public void | |
| public void | |
| public boolean | |
| public int | |
| public void | |
| public void | |
| public boolean | |
| public float | |
| public float | |
| public float | |
| public boolean | Returns: true if this array was modified.Removes from this array the first instance of each element contained in the specified array. |
| public float | |
| public void | |
| public boolean | |
| public int | Returns: the number of replacements donethe float to be replaced value, float all occurrences of value will be replaced by this replacement replacement)Returns the number of replacements done. |
| public boolean | Returns: if value was found and replacedthe float to be replaced value, float the first value will be replaced by this replacement if found replacement)Returns true if the specified value was replaced successfully with the replacement |
| protected float[] | |
| public void | |
| public void | |
| public float[] | |
| public float[] | |
| public void | |
| public void | |
| public void | |
| public float[] | |
| public String | |
| public String | |
| public void | |
| public static FloatArray |
| items | back to summary |
|---|---|
| public float[] items | |
| ordered | back to summary |
|---|---|
| public boolean ordered | |
| size | back to summary |
|---|---|
| public int size | |
| FloatArray | back to summary |
|---|---|
| public FloatArray() Creates an ordered array with a capacity of 16. | |
| FloatArray | back to summary |
|---|---|
| public FloatArray(int capacity) Creates an ordered array with the specified capacity. | |
| FloatArray | back to summary |
|---|---|
public FloatArray(boolean ordered, int capacity)
| |
| FloatArray | back to summary |
|---|---|
| public FloatArray(FloatArray array) Creates a new array containing the elements in the specific array. The new array will be ordered if the specific array is ordered. The capacity is set to the number of elements, so any subsequent elements added will cause the backing array to be grown. | |
| FloatArray | back to summary |
|---|---|
| public FloatArray(float[] array) Creates a new ordered array containing the elements in the specified array. The capacity is set to the number of elements, so any subsequent elements added will cause the backing array to be grown. | |
| FloatArray | back to summary |
|---|---|
| public FloatArray(boolean ordered, float[] array, int startIndex, int count) Creates a new array containing the elements in the specified array. The capacity is set to the number of elements, so any subsequent elements added will cause the backing array to be grown.
| |
| add | back to summary |
|---|---|
| public void add(float value) | |
| add | back to summary |
|---|---|
| public void add(float value1, float value2) | |
| add | back to summary |
|---|---|
| public void add(float value1, float value2, float value3) | |
| add | back to summary |
|---|---|
| public void add(float value1, float value2, float value3, float value4) | |
| addAll | back to summary |
|---|---|
| public void addAll(FloatArray array) | |
| addAll | back to summary |
|---|---|
| public void addAll(FloatArray array, int offset, int length) | |
| addAll | back to summary |
|---|---|
| public void addAll(float... array) | |
| addAll | back to summary |
|---|---|
| public void addAll(float[] array, int offset, int length) | |
| clear | back to summary |
|---|---|
| public void clear() | |
| contains | back to summary |
|---|---|
| public boolean contains(float value) | |
| ensureCapacity | back to summary |
|---|---|
| public float[] ensureCapacity(int additionalCapacity) Increases the size of the backing array to accommodate the specified number of additional items. Useful before adding many items to avoid multiple backing array resizes.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Returns false if either array is unordered. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object object, float epsilon) Returns false if either array is unordered. | |
| first | back to summary |
|---|---|
| public float first() Returns the first item. | |
| get | back to summary |
|---|---|
| public float get(int index) | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| incr | back to summary |
|---|---|
| public void incr(int index, float value) | |
| incr | back to summary |
|---|---|
| public void incr(float value) | |
| indexOf | back to summary |
|---|---|
| public int indexOf(float value) | |
| insert | back to summary |
|---|---|
| public void insert(int index, float value) | |
| insertRange | back to summary |
|---|---|
| public void insertRange(int index, int count) Inserts the specified number of items at the specified index. The new items will have values equal to the values at those indices before the insertion. | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns true if the array is empty. | |
| lastIndexOf | back to summary |
|---|---|
| public int lastIndexOf(float value) | |
| mul | back to summary |
|---|---|
| public void mul(int index, float value) | |
| mul | back to summary |
|---|---|
| public void mul(float value) | |
| notEmpty | back to summary |
|---|---|
| public boolean notEmpty() Returns true if the array has one or more items. | |
| peek | back to summary |
|---|---|
| public float peek() Returns the last item. | |
| pop | back to summary |
|---|---|
| public float pop() Removes and returns the last item. | |
| random | back to summary |
|---|---|
| public float random() Returns a random item from the array, or zero if the array is empty. | |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(FloatArray array) Removes from this array the first instance of each element contained in the specified array.
| |
| removeIndex | back to summary |
|---|---|
| public float removeIndex(int index) Removes and returns the item at the specified index. | |
| removeRange | back to summary |
|---|---|
| public void removeRange(int start, int end) Removes the items between the specified indices, inclusive. | |
| removeValue | back to summary |
|---|---|
| public boolean removeValue(float value) | |
| replaceAll | back to summary |
|---|---|
| public int replaceAll(float value, float replacement) Returns the number of replacements done.
| |
| replaceFirst | back to summary |
|---|---|
| public boolean replaceFirst(float value, float replacement) Returns true if the specified value was replaced successfully with the replacement
| |
| resize | back to summary |
|---|---|
| protected float[] resize(int newSize) | |
| reverse | back to summary |
|---|---|
| public void reverse() | |
| set | back to summary |
|---|---|
| public void set(int index, float value) | |
| setSize | back to summary |
|---|---|
| public float[] setSize(int newSize) Sets the array size, leaving any values beyond the current size undefined.
| |
| shrink | back to summary |
|---|---|
| public float[] shrink() Reduces the size of the backing array to the size of the actual items. This is useful to release memory when many items have been removed, or if it is known that more items will not be added.
| |
| shuffle | back to summary |
|---|---|
| public void shuffle() | |
| sort | back to summary |
|---|---|
| public void sort() | |
| swap | back to summary |
|---|---|
| public void swap(int first, int second) | |
| toArray | back to summary |
|---|---|
| public float[] toArray() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| toString | back to summary |
|---|---|
| public String toString(String separator) | |
| truncate | back to summary |
|---|---|
| public void truncate(int newSize) Reduces the size of the array to the specified size. If the array is already smaller than the specified size, no action is taken. | |
| with | back to summary |
|---|---|
public static FloatArray with(float... array)
| |