public class BooleanBigList extends IBooleanList
Note that this implementation is not synchronized. Due to data caching used for exploiting locality of reference, performance can decrease if BooleanBigList is accessed by several threads at different positions.
Note that the iterators provided are not fail-fast.
| Constructor and Description |
|---|
BooleanBigList()
Default constructor.
|
BooleanBigList(java.util.Collection<java.lang.Boolean> coll)
Create new list with specified elements.
|
BooleanBigList(int blockSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
binarySearch(int index,
int len,
boolean key)
Searches the specified range for an object using the binary
search algorithm.
|
int |
blockSize()
Returns block size used for this BooleanBigList.
|
int |
capacity()
As BooleanBigList grows and shrinks automatically, the term capacity does not really make sense.
|
java.lang.Object |
clone()
Returns a shallow copy of this BooleanBigList instance
The copy is realized by a copy-on-write approach so also really large lists can efficiently be copied.
|
BooleanBigList |
copy()
Returns a copy of this BooleanBigList instance.
|
static BooleanBigList |
create()
Create new list.
|
static BooleanBigList |
create(boolean... elems)
Create new list with specified elements.
|
static BooleanBigList |
create(java.util.Collection<java.lang.Boolean> coll)
Create new list with specified elements.
|
static BooleanBigList |
EMPTY() |
boolean |
getDefaultElem() |
static IBooleanList |
of(boolean[] values) |
static IBooleanList |
of(java.lang.Boolean[] values) |
static IBooleanList |
of(java.util.List<java.lang.Boolean> 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.
|
BooleanBigList |
unmodifiableList()
Returns an unmodifiable view of this list.
|
add, add, addAll, addAll, addAll, addAll, addArray, addArray, addFirst, addIfAbsent, addLast, addMult, addMult, binarySearch, clear, contains, containsAll, containsAny, copy, drag, element, ensureCapacity, equals, extract, extractWhere, fill, filter, get, getAll, getAll, getArray, getCount, getDistinct, getFirst, getLast, getWhere, hashCode, indexOf, indexOf, initAll, initAll, initArray, initMult, isEmpty, lastIndexOf, lastIndexOf, mappedList, move, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, put, putAll, putAll, putArray, putMult, remove, remove, remove, removeAll, removeAll, removeAll, removeElem, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, removeWhere, replaceAll, replaceAll, replaceArray, replaceMult, resize, retainAll, retainAll, retainWhere, reverse, reverse, rotate, rotate, set, setAll, setAll, setArray, setMult, sort, swap, toArray, toArray, toArray, toString, transferCopy, transferMove, transferRemove, transferSwappublic BooleanBigList()
public BooleanBigList(int blockSize)
blockSize - block sizepublic BooleanBigList(java.util.Collection<java.lang.Boolean> coll)
coll - collection with elementpublic static IBooleanList of(boolean[] values)
public static IBooleanList of(java.lang.Boolean[] values)
public static IBooleanList of(java.util.List<java.lang.Boolean> values)
public static BooleanBigList EMPTY()
public static BooleanBigList create()
type - of elements stored in the listpublic static BooleanBigList create(java.util.Collection<java.lang.Boolean> coll)
coll - collection with elementtype - of elements stored in the listpublic static BooleanBigList create(boolean... elems)
elems - array with elementstype - of elements stored in the listpublic int blockSize()
public BooleanBigList copy()
copy in class IBooleanListIBooleanList.clone()public java.lang.Object clone()
clone in class IBooleanListpublic boolean getDefaultElem()
public int size()
size in class IBooleanListpublic int capacity()
capacity in class IBooleanListpublic BooleanBigList unmodifiableList()
IBooleanListunmodifiableList in class IBooleanListpublic void trimToSize()
trimToSize in class IBooleanListpublic void sort(int index,
int len)
IBooleanListsort in class IBooleanListindex - index of first element to sortlen - number of elements to sortArrays.sort(int[])public int binarySearch(int index,
int len,
boolean key)
IBooleanListbinarySearch in class IBooleanListindex - index of first element to searchlen - number of elements to searchkey - the value to be searched forArrays.binarySearch(long[], long)