public class TUnmodifiableFloatList extends TUnmodifiableFloatCollection implements TFloatList
| Constructor and Description |
|---|
TUnmodifiableFloatList(TFloatList list) |
| 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(java.lang.Object o)
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 procedure)
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 condition)
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 condition)
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 offset,
float val)
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(java.util.Random rand)
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 function)
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 TUnmodifiableFloatList(TFloatList list)
public boolean equals(java.lang.Object o)
TFloatCollectionequals in interface TFloatCollectionequals in class java.lang.Objecto - object to be compared for equality with this collectionpublic int hashCode()
TFloatCollectionObject.hashCode().hashCode in interface TFloatCollectionhashCode in class java.lang.ObjectObject.equals(Object),
Collection.equals(Object)public float get(int index)
TFloatListget in interface TFloatListindex - an int valuefloat valuepublic int indexOf(float o)
TFloatListindexOf in interface TFloatListo - an float valuefor faster searches on sorted listspublic int lastIndexOf(float o)
TFloatListlastIndexOf in interface TFloatListo - an float valuefor faster searches on sorted listspublic float[] toArray(int offset,
int len)
TFloatListtoArray in interface TFloatListoffset - the offset at which to start copyinglen - the number of values to copy.float[] valuepublic float[] toArray(float[] dest,
int offset,
int len)
TFloatListtoArray in interface TFloatListdest - the array to copy into.offset - the offset where the first value should be copiedlen - the number of values to copy.public float[] toArray(float[] dest,
int source_pos,
int dest_pos,
int len)
TFloatListtoArray in interface TFloatListdest - the array to copy into.source_pos - the offset of the first value to copydest_pos - the offset where the first value should be copiedlen - the number of values to copy.public boolean forEachDescending(TFloatProcedure procedure)
TFloatListforEachDescending in interface TFloatListprocedure - a TFloatProcedure valuepublic int binarySearch(float value)
TFloatListbinarySearch in interface TFloatListvalue - the value to search forpublic int binarySearch(float value,
int fromIndex,
int toIndex)
TFloatListbinarySearch in interface TFloatListvalue - the value to search forfromIndex - the lower boundary of the range (inclusive)toIndex - the upper boundary of the range (exclusive)public int indexOf(int offset,
float value)
TFloatListindexOf in interface TFloatListoffset - the offset at which to start the linear search
(inclusive)value - an float valuefor faster searches on sorted listspublic int lastIndexOf(int offset,
float value)
TFloatListlastIndexOf in interface TFloatListoffset - the offset at which to start the linear search
(exclusive)value - an float valuefor faster searches on sorted listspublic TFloatList grep(TFloatProcedure condition)
TFloatListgrep in interface TFloatListcondition - a condition to apply to each element in the listpublic TFloatList inverseGrep(TFloatProcedure condition)
TFloatListgrep -v.inverseGrep in interface TFloatListcondition - a condition to apply to each element in the listpublic float max()
TFloatListmax in interface TFloatListpublic float min()
TFloatListmin in interface TFloatListpublic float sum()
TFloatListsum in interface TFloatListpublic TFloatList subList(int fromIndex, int toIndex)
TFloatListsubList in interface TFloatListfromIndex - low endpoint (inclusive) of the subList.toIndex - high endpoint (exclusive) of the subList.public void add(float[] vals)
TFloatListadd in interface TFloatListvals - an float[] valuepublic void add(float[] vals,
int offset,
int length)
TFloatListadd in interface TFloatListvals - an float[] valueoffset - the offset at which to start copyinglength - the number of values to copy.public float removeAt(int offset)
TFloatListremoveAt in interface TFloatListoffset - an int value that represents
the offset to the element to be removedpublic void remove(int offset,
int length)
TFloatListremove in interface TFloatListoffset - an int valuelength - an int valuepublic void insert(int offset,
float value)
TFloatListinsert in interface TFloatListoffset - an int valuevalue - an float valuepublic void insert(int offset,
float[] values)
TFloatListinsert in interface TFloatListoffset - an int valuevalues - an float[] valuepublic void insert(int offset,
float[] values,
int valOffset,
int len)
TFloatListinsert in interface TFloatListoffset - an int valuevalues - an float[] valuevalOffset - the offset in the values array at which to
start copying.len - the number of values to copy from the values arraypublic float set(int offset,
float val)
TFloatListset in interface TFloatListoffset - an int valueval - an float valuepublic void set(int offset,
float[] values)
TFloatListset in interface TFloatListoffset - the first offset to replacevalues - the source of the new valuespublic void set(int offset,
float[] values,
int valOffset,
int length)
TFloatListset in interface TFloatListoffset - the first offset to replacevalues - the source of the new valuesvalOffset - the first value to copy from the values arraylength - the number of values to copypublic float replace(int offset,
float val)
TFloatListreplace in interface TFloatListoffset - an int valueval - an float valuepublic void transformValues(TFloatFunction function)
TFloatListtransformValues in interface TFloatListfunction - a TFloatFunction valuepublic void reverse()
TFloatListreverse in interface TFloatListpublic void reverse(int from,
int to)
TFloatListreverse in interface TFloatListfrom - the inclusive index at which to start reversingto - the exclusive index at which to stop reversingpublic void shuffle(java.util.Random rand)
TFloatListshuffle in interface TFloatListrand - a Random valuepublic void sort()
TFloatListsort in interface TFloatListArrays.sort(int[])public void sort(int fromIndex,
int toIndex)
TFloatListsort in interface TFloatListfromIndex - the index at which to start sorting (inclusive)toIndex - the index at which to stop sorting (exclusive)Arrays.sort(int[])public void fill(float val)
TFloatListfill in interface TFloatListval - the value to use when fillingpublic void fill(int fromIndex,
int toIndex,
float val)
TFloatListfill in interface TFloatListfromIndex - the offset at which to start filling (inclusive)toIndex - the offset at which to stop filling (exclusive)val - the value to use when filling