Interface IFloatArrayList
- All Known Implementing Classes:
AdaptiveFloatArrayList,CompactFloatArrayList,TFloatArrayList
public interface IFloatArrayList
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(float val) Adds val to the end of the list, growing as needed.intbinarySearch(float value) Performs a binary search for value in the entire list.voidclear()copy()floatget(int offset) Returns the value at the specified offset.voidinsert(int offset, float value) Inserts value into the list at offset.booleanisEmpty()Tests whether this list contains any values.voidset(int offset, float val) Sets the value at the specified offset.intsize()Returns the number of values in the list.float[]void
-
Method Details
-
size
int size()Returns the number of values in the list.- Returns:
- the number of values in the list.
-
add
void add(float val) Adds val to the end of the list, growing as needed.- Parameters:
val- anfloatvalue
-
insert
void insert(int offset, float value) Inserts value into the list at offset. All values including and to the right of offset are shifted to the right.- Parameters:
offset- anintvaluevalue- anfloatvalue
-
get
float get(int offset) Returns the value at the specified offset.- Parameters:
offset- anintvalue- Returns:
- an
floatvalue
-
set
void set(int offset, float val) Sets the value at the specified offset.- Parameters:
offset- anintvalueval- anfloatvalue
-
binarySearch
int binarySearch(float value) Performs a binary search for value in the entire list. Note that you must @{link #sort sort} the list before doing a search.- Parameters:
value- the value to search for- Returns:
- the absolute offset in the list of the value, or its negative insertion point into the sorted list.
-
isEmpty
boolean isEmpty()Tests whether this list contains any values.- Returns:
- true if the list is empty.
-
copy
IFloatArrayList copy() -
toNativeArray
float[] toNativeArray() -
clear
void clear() -
trimToSize
void trimToSize()
-