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