public class ShortBigList extends IShortList
Note that this implementation is not synchronized. Due to data caching used for exploiting locality of reference, performance can decrease if ShortBigList is accessed by several threads at different positions.
Note that the iterators provided are not fail-fast.
| Constructor and Description |
|---|
ShortBigList()
Default constructor.
|
ShortBigList(java.util.Collection<java.lang.Short> coll)
Create new list with specified elements.
|
ShortBigList(int blockSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
binarySearch(int index,
int len,
short key)
Searches the specified range for an object using the binary
search algorithm.
|
int |
blockSize()
Returns block size used for this ShortBigList.
|
int |
capacity()
As ShortBigList grows and shrinks automatically, the term capacity does not really make sense.
|
java.lang.Object |
clone()
Returns a shallow copy of this ShortBigList instance
The copy is realized by a copy-on-write approach so also really large lists can efficiently be copied.
|
ShortBigList |
copy()
Returns a copy of this ShortBigList instance.
|
static ShortBigList |
create()
Create new list.
|
static ShortBigList |
create(java.util.Collection<java.lang.Short> coll)
Create new list with specified elements.
|
static ShortBigList |
create(short... elems)
Create new list with specified elements.
|
static ShortBigList |
EMPTY() |
short |
getDefaultElem() |
static IShortList |
of(java.util.List<java.lang.Short> values) |
static IShortList |
of(short[] values) |
static IShortList |
of(java.lang.Short[] 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.
|
ShortBigList |
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 ShortBigList()
public ShortBigList(int blockSize)
blockSize - block sizepublic ShortBigList(java.util.Collection<java.lang.Short> coll)
coll - collection with elementpublic static IShortList of(short[] values)
public static IShortList of(java.lang.Short[] values)
public static IShortList of(java.util.List<java.lang.Short> values)
public static ShortBigList EMPTY()
public static ShortBigList create()
type - of elements stored in the listpublic static ShortBigList create(java.util.Collection<java.lang.Short> coll)
coll - collection with elementtype - of elements stored in the listpublic static ShortBigList create(short... elems)
elems - array with elementstype - of elements stored in the listpublic int blockSize()
public ShortBigList copy()
copy in class IShortListIShortList.clone()public java.lang.Object clone()
clone in class IShortListpublic short getDefaultElem()
public int size()
size in class IShortListpublic int capacity()
capacity in class IShortListpublic ShortBigList unmodifiableList()
IShortListunmodifiableList in class IShortListpublic void trimToSize()
trimToSize in class IShortListpublic void sort(int index,
int len)
IShortListsort in class IShortListindex - index of first element to sortlen - number of elements to sortArrays.sort(int[])public int binarySearch(int index,
int len,
short key)
IShortListbinarySearch in class IShortListindex - index of first element to searchlen - number of elements to searchkey - the value to be searched forArrays.binarySearch(long[], long)