public class TSynchronizedFloatList extends TSynchronizedFloatCollectionimplements TFloatList
| Constructor and Description |
|---|
TSynchronizedFloatList(TFloatList
|
TSynchronizedFloatList(TFloatList
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(float[] vals)
Adds the values in the array
vals to the end of the list, in order.
|
void |
add(float[] vals, int offset, int length)
Adds a subset of the values in the array
vals to the end of the list, in order.
|
int |
binarySearch(float value)
Performs a binary search for
value in the entire list.
|
int |
binarySearch(float value, int fromIndex, int toIndex)
Performs a binary search for
value in the specified range.
|
boolean |
equals(Object
Compares the specified object with this collection for equality.
|
void |
fill(float val)
Fills every slot in the list with the specified value.
|
void |
fill(int fromIndex, int toIndex, float val)
Fills a range in the list with the specified value.
|
boolean |
forEachDescending(TFloatProcedure
Applies the procedure to each value in the list in descending (back to front) order.
|
float |
get(int index)
Returns the value at the specified offset.
|
TFloatList |
grep(TFloatProcedure
Searches the list for values satisfying
condition in the manner of the *nix
grep utility.
|
int |
hashCode()
Returns the hash code value for this collection.
|
int |
indexOf(float o)
Searches the list front to back for the index of
value.
|
int |
indexOf(int offset, float value)
Searches the list front to back for the index of
value, starting at
offset.
|
void |
insert(int offset, float value)
Inserts
value into the list at
offset.
|
void |
insert(int offset, float[] values)
Inserts the array of
values into the list at
offset.
|
void |
insert(int offset, float[] values, int valOffset, int len)
Inserts a slice of the array of
values into the list at
offset.
|
TFloatList |
inverseGrep(TFloatProcedure
Searches the list for values which do
not satisfy
condition.
|
int |
lastIndexOf(float o)
Searches the list back to front for the last index of
value.
|
int |
lastIndexOf(int offset, float value)
Searches the list back to front for the last index of
value, starting at
offset.
|
float |
max()
Finds the maximum value in the list.
|
float |
min()
Finds the minimum value in the list.
|
void |
remove(int offset, int length)
Removes
length values from the list, starting at
offset
|
float |
removeAt(int offset)
Removes
value at a given offset from the list.
|
float |
replace(int offset, float val)
Sets the value at the specified offset and returns the previously stored value.
|
void |
reverse()
Reverse the order of the elements in the list.
|
void |
reverse(int from, int to)
Reverse the order of the elements in the range of the list.
|
float |
set(int index, float element)
Sets the value at the specified offset.
|
void |
set(int offset, float[] values)
Replace the values in the list starting at
offset with the contents of the
values array.
|
void |
set(int offset, float[] values, int valOffset, int length)
Replace the values in the list starting at
offset with
length values from the
values array, starting at valOffset.
|
void |
shuffle(Random
Shuffle the elements of the list using the specified random number generator.
|
void |
sort()
Sort the values in the list (ascending) using the Sun quicksort implementation.
|
void |
sort(int fromIndex, int toIndex)
Sort a slice of the list (ascending) using the Sun quicksort implementation.
|
TFloatList |
subList(int fromIndex, int toIndex)
Returns a sublist of this list.
|
float |
sum()
Calculates the sum of all the values in the list.
|
float[] |
toArray(float[] dest, int offset, int len)
Copies a slice of the list into a native array.
|
float[] |
toArray(float[] dest, int source_pos, int dest_pos, int len)
Copies a slice of the list into a native array.
|
float[] |
toArray(int offset, int len)
Copies a slice of the list into a native array.
|
void |
transformValues(TFloatFunction
Transform each value in the list using the specified function.
|
add, addAll, addAll, addAll, clear, contains, containsAll, containsAll, containsAll, forEach, getNoEntryValue, isEmpty, iterator, remove, removeAll, removeAll, removeAll, retainAll, retainAll, retainAll, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, clear, contains, forEach, getNoEntryValue, isEmpty, remove, size, toArray, toArrayaddAll, addAll, addAll, containsAll, containsAll, containsAll, iterator, removeAll, removeAll, removeAll, retainAll, retainAll, retainAllpublic TSynchronizedFloatList(TFloatListlist)
public TSynchronizedFloatList(TFloatListlist, Object mutex)
public boolean equals(Objecto)
TFloatCollection
equals in interface
TFloatCollection
equals in class
Object
o - object to be compared for equality with this collection
public int hashCode()
TFloatCollection
Object.hashCode() .
hashCode in interface
TFloatCollection
hashCode in class
Object
Object.equals(Object) ,
Collection.equals(Object)
public float get(int index)
TFloatList
get in interface
TFloatList
index - an
int value
float value
public float set(int index,
float element)
TFloatList
set in interface
TFloatList
index - an
int value
element - an
float value
public void set(int offset,
float[] values)
TFloatList
set in interface
TFloatList
offset - the first offset to replace
values - the source of the new values
public void set(int offset,
float[] values,
int valOffset,
int length)
TFloatList
set in interface
TFloatList
offset - the first offset to replace
values - the source of the new values
valOffset - the first value to copy from the values array
length - the number of values to copy
public float replace(int offset,
float val)
TFloatList
replace in interface
TFloatList
offset - an
int value
val - an
float value
public void remove(int offset,
int length)
TFloatList
remove in interface
TFloatList
offset - an
int value
length - an
int value
public float removeAt(int offset)
TFloatList
removeAt in interface
TFloatList
offset - an
int value that represents the offset to the element to be removed
public void add(float[] vals)
TFloatList
add in interface
TFloatList
vals - an
float[] value
public void add(float[] vals,
int offset,
int length)
TFloatList
add in interface
TFloatList
vals - an
float[] value
offset - the offset at which to start copying
length - the number of values to copy.
public void insert(int offset,
float value)
TFloatList
insert in interface
TFloatList
offset - an
int value
value - an
float value
public void insert(int offset,
float[] values)
TFloatList
insert in interface
TFloatList
offset - an
int value
values - an
float[] value
public void insert(int offset,
float[] values,
int valOffset,
int len)
TFloatList
insert in interface
TFloatList
offset - an
int value
values - an
float[] value
valOffset - the offset in the values array at which to start copying.
len - the number of values to copy from the values array
public int indexOf(float o)
TFloatList
indexOf in interface
TFloatList
o - an
float value
for faster searches on sorted lists
public int lastIndexOf(float o)
TFloatList
lastIndexOf in interface
TFloatList
o - an
float value
for faster searches on sorted lists
public TFloatListsubList(int fromIndex, int toIndex)
TFloatList
subList in interface
TFloatList
fromIndex - low endpoint (inclusive) of the subList.
toIndex - high endpoint (exclusive) of the subList.
public float[] toArray(int offset,
int len)
TFloatList
toArray in interface
TFloatList
offset - the offset at which to start copying
len - the number of values to copy.
float[] value
public float[] toArray(float[] dest,
int offset,
int len)
TFloatList
toArray in interface
TFloatList
dest - the array to copy into.
offset - the offset where the first value should be copied
len - the number of values to copy.
public float[] toArray(float[] dest,
int source_pos,
int dest_pos,
int len)
TFloatList
toArray in interface
TFloatList
dest - the array to copy into.
source_pos - the offset of the first value to copy
dest_pos - the offset where the first value should be copied
len - the number of values to copy.
public int indexOf(int offset,
float value)
TFloatList
indexOf in interface
TFloatList
offset - the offset at which to start the linear search (inclusive)
value - an
float value
for faster searches on sorted lists
public int lastIndexOf(int offset,
float value)
TFloatList
lastIndexOf in interface
TFloatList
offset - the offset at which to start the linear search (exclusive)
value - an
float value
for faster searches on sorted lists
public void fill(float val)
TFloatList
fill in interface
TFloatList
val - the value to use when filling
public void fill(int fromIndex,
int toIndex,
float val)
TFloatList
fill in interface
TFloatList
fromIndex - the offset at which to start filling (inclusive)
toIndex - the offset at which to stop filling (exclusive)
val - the value to use when filling
public void reverse()
TFloatList
public void reverse(int from,
int to)
TFloatList
reverse in interface
TFloatList
from - the inclusive index at which to start reversing
to - the exclusive index at which to stop reversing
public void shuffle(Randomrand)
TFloatList
shuffle in interface
TFloatList
rand - a
Random value
public void sort()
TFloatList
sort in interface
TFloatList
Arrays.sort(int[])
public void sort(int fromIndex,
int toIndex)
TFloatList
sort in interface
TFloatList
fromIndex - the index at which to start sorting (inclusive)
toIndex - the index at which to stop sorting (exclusive)
Arrays.sort(int[])
public int binarySearch(float value)
TFloatList
binarySearch in interface
TFloatList
value - the value to search for
public int binarySearch(float value,
int fromIndex,
int toIndex)
TFloatList
binarySearch in interface
TFloatList
value - the value to search for
fromIndex - the lower boundary of the range (inclusive)
toIndex - the upper boundary of the range (exclusive)
public TFloatListgrep(TFloatProcedure condition)
TFloatList
grep in interface
TFloatList
condition - a condition to apply to each element in the list
public TFloatListinverseGrep(TFloatProcedure condition)
TFloatList
grep -v.
inverseGrep in interface
TFloatList
condition - a condition to apply to each element in the list
public float max()
TFloatList
max in interface
TFloatList
public float min()
TFloatList
min in interface
TFloatList
public float sum()
TFloatList
sum in interface
TFloatList
public boolean forEachDescending(TFloatProcedureprocedure)
TFloatList
forEachDescending in interface
TFloatList
procedure - a
TFloatProcedure value
public void transformValues(TFloatFunctionfunction)
TFloatList
transformValues in interface
TFloatList
function - a
TFloatFunction value