public class FloatBigList extends IFloatList
Note that this implementation is not synchronized. Due to data caching used for exploiting locality of reference, performance can decrease if FloatBigList is accessed by several threads at different positions.
Note that the iterators provided are not fail-fast.
| Modifier and Type | Class and Description |
|---|---|
static class |
FloatBigList.FloatBlock
A block stores in maximum blockSize number of elements.
|
| Constructor and Description |
|---|
FloatBigList()
Default constructor.
|
FloatBigList(java.util.Collection<java.lang.Float> coll)
Create new list with specified elements.
|
FloatBigList(int blockSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
binarySearch(int index,
int len,
float key)
Searches the specified range for an object using the binary
search algorithm.
|
int |
blockSize()
Returns block size used for this FloatBigList.
|
int |
capacity()
Returns capacity of this list.
|
java.lang.Object |
clone()
Returns a shallow copy of this FloatBigList instance
The copy is realized by a copy-on-write approach so also really large lists can efficiently be copied.
|
FloatBigList |
copy()
Returns a copy of this FloatBigList instance.
|
static FloatBigList |
create()
Create new list.
|
static FloatBigList |
create(java.util.Collection<java.lang.Float> coll)
Create new list with specified elements.
|
static FloatBigList |
create(float... elems)
Create new list with specified elements.
|
static FloatBigList |
EMPTY() |
float |
getDefaultElem() |
void |
init()
Initialize the list to be empty.
|
void |
init(java.util.Collection<java.lang.Float> that)
Initialize the list to have all elements in the specified collection.
|
void |
init(float... elems)
Initialize the list to have the specified elements.
|
static IFloatList |
of(float[] values) |
static IFloatList |
of(java.lang.Float[] values) |
static IFloatList |
of(java.util.List<java.lang.Float> values) |
int |
size() |
void |
sort(int index,
int len)
Sort specified elements in the list using the specified comparator.
|
void |
trimToSize()
Pack as many elements in the blocks as allowed.
|
FloatBigList |
unmodifiableList()
Returns an unmodifiable view of this list.
|
add, add, addAll, addAll, addAll, addAll, addAll, addAll, addFirst, addIfAbsent, addLast, binarySearch, clear, contains, containsAll, containsAny, copy, copy, drag, element, ensureCapacity, equals, extract, fill, fill, filter, get, getAll, getAll, getArray, getCount, getDistinct, getFirst, getLast, hashCode, indexOf, init, isEmpty, lastIndexOf, mappedList, merge, move, move, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeAll, removeAll, removeAll, removeElem, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, resize, retainAll, retainAll, reverse, reverse, rotate, rotate, set, setAll, setAll, setAll, sort, swap, swap, toArray, toArray, toArray, toStringpublic FloatBigList()
public FloatBigList(int blockSize)
blockSize - block sizepublic FloatBigList(java.util.Collection<java.lang.Float> coll)
coll - collection with elementtype - of elements stored in the listpublic static IFloatList of(float[] values)
public static IFloatList of(java.lang.Float[] values)
public static IFloatList of(java.util.List<java.lang.Float> values)
public static FloatBigList EMPTY()
public static FloatBigList create()
type - of elements stored in the listpublic static FloatBigList create(java.util.Collection<java.lang.Float> coll)
coll - collection with elementtype - of elements stored in the listpublic static FloatBigList create(float... elems)
elems - array with elementstype - of elements stored in the listpublic void init()
public void init(float... elems)
elems - elementspublic void init(java.util.Collection<java.lang.Float> that)
that - collectionpublic int blockSize()
public FloatBigList copy()
copy in class IFloatListIFloatList.clone()public java.lang.Object clone()
clone in class IFloatListCloneablepublic float getDefaultElem()
public int size()
size in class IFloatListpublic int capacity()
capacity in class IFloatListpublic FloatBigList unmodifiableList()
IFloatListunmodifiableList in class IFloatListpublic void trimToSize()
trimToSize in class IFloatListpublic void sort(int index,
int len)
IFloatListsort in class IFloatListindex - index of first element to sortlen - number of elements to sortArrays.sort(long[])public int binarySearch(int index,
int len,
float key)
IFloatListbinarySearch in class IFloatListindex - index of first element to searchlen - number of elements to searchkey - the value to be searched forArrays.binarySearch(long[], long)