public static class ByteBigLists.ListBigList extends AbstractByteBigList implements Serializable
AbstractByteBigList.ByteSubList| Modifier | Constructor and Description |
|---|---|
protected |
ListBigList(ByteList list) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(byte key)
Ensures that this collection contains the specified element (optional operation).
|
void |
add(long index,
byte key)
Inserts the specified element at the specified position in this type-specific big list (optional operation).
|
boolean |
addAll(ByteBigList c)
Appends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).
|
boolean |
addAll(ByteCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(Collection<? extends Byte> c) |
boolean |
addAll(long index,
ByteBigList c)
Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).
|
boolean |
addAll(long index,
ByteCollection c)
Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).
|
boolean |
addAll(long index,
Collection<? extends Byte> c)
Adds all of the elements in the specified collection to this list (optional operation).
|
void |
clear() |
boolean |
contains(byte key)
Returns true if this list contains the specified element.
|
boolean |
containsAll(ByteCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
containsAll(Collection<?> c) |
byte |
getByte(long index)
Returns the element at the specified position.
|
int |
hashCode()
Returns the hash code for this big list, which is identical to
List.hashCode(). |
long |
indexOf(byte k)
Returns the index of the first occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.
|
boolean |
isEmpty()
Checks whether the stack is empty.
|
ByteBigListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
long |
lastIndexOf(byte k)
Returns the index of the last occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.
|
ByteBigListIterator |
listIterator()
Returns a type-specific big-list iterator on this type-specific big list.
|
ByteBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
removeAll(ByteCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeAll(Collection<?> c) |
byte |
removeByte(long index)
Removes the element at the specified position.
|
void |
removeElements(long from,
long to)
Removes (hopefully quickly) elements of this type-specific big list.
|
boolean |
retainAll(ByteCollection c)
Retains in this collection only elements from the given type-specific collection.
|
boolean |
retainAll(Collection<?> c) |
byte |
set(long index,
byte k)
Replaces the element at the specified position in this big list with the specified element (optional operation).
|
void |
size(long size)
Sets the size of this big list.
|
long |
size64()
Returns the size of this data structure as a long.
|
ByteBigList |
subList(long from,
long to)
Returns a type-specific view of the portion of this type-specific big list from the index
from, inclusive, to the index to, exclusive. |
<T> T[] |
toArray(T[] a) |
byte[] |
toByteArray()
Returns a primitive type array containing the items of this collection.
|
byte[] |
toByteArray(byte[] a)
Deprecated.
|
add, addElements, addElements, compareTo, ensureIndex, ensureRestrictedIndex, equals, get, getElements, indexOf, lastIndexOf, peek, peekByte, pop, popByte, push, push, rem, remove, set, size, top, topByte, toStringadd, contains, remove, toArraytoArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, contains, remove, removeIf, removeIf, toArrayparallelStream, spliterator, stream, toArrayforEach, forEachprotected ListBigList(ByteList list)
public long size64()
Size64public void size(long size)
BigListIf the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null/false.
size in interface BigList<Byte>size in class AbstractByteBigListsize - the new size.public ByteBigListIterator iterator()
AbstractByteBigListNote that this specification strengthens the one given in
Iterable.iterator(), which was already
strengthened in the corresponding type-specific class,
but was weakened by the fact that this interface extends Collection.
This implementation delegates to AbstractByteBigList.listIterator().
iterator in interface ByteBigListiterator in interface ByteCollectioniterator in interface ByteIterableiterator in interface Iterable<Byte>iterator in interface Collection<Byte>iterator in class AbstractByteBigListIterable.iterator()public ByteBigListIterator listIterator()
AbstractByteBigListNote that this specification strengthens the one given in BigList.listIterator().
This implementation delegates to listIterator(0).
listIterator in interface BigList<Byte>listIterator in interface ByteBigListlistIterator in class AbstractByteBigListBigList.listIterator()public ByteBigListIterator listIterator(long index)
AbstractByteBigListNote that this specification strengthens the one given in BigList.listIterator(long).
This implementation is based on the random-access methods.
listIterator in interface BigList<Byte>listIterator in interface ByteBigListlistIterator in class AbstractByteBigListindex - index of first element to be returned from the big-list iterator.BigList.listIterator(long)public boolean addAll(long index,
Collection<? extends Byte> c)
AbstractByteBigListaddAll in interface BigList<Byte>addAll in class AbstractByteBigListindex - index at which to insert the first element from the specified collection.c - collection containing elements to be added to this big list.true if this big list changed as a result of the callList.addAll(int, Collection)public ByteBigList subList(long from, long to)
ByteBigListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in BigList.subList(long,long).
subList in interface BigList<Byte>subList in interface ByteBigListsubList in class AbstractByteBigListfrom - the starting element (inclusive).to - the ending element (exclusive).BigList.subList(long,long)public boolean contains(byte key)
AbstractByteBigListThis implementation delegates to indexOf().
contains in interface ByteCollectioncontains in class AbstractByteBigListCollection.contains(Object)public byte[] toByteArray()
ByteCollectiontoByteArray in interface ByteCollectiontoByteArray in class AbstractByteCollectionCollection.toArray()public void removeElements(long from,
long to)
AbstractByteBigListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface ByteBigListremoveElements in class AbstractByteBigListfrom - the start index (inclusive).to - the end index (exclusive).@Deprecated public byte[] toByteArray(byte[] a)
AbstractByteCollectionNote that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toByteArray in interface ByteCollectiontoByteArray in class AbstractByteCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public boolean addAll(long index,
ByteCollection c)
AbstractByteBigListThis implementation delegates to the type-specific version of AbstractByteBigList.addAll(long, Collection).
addAll in interface ByteBigListaddAll in class AbstractByteBigListList.addAll(int,java.util.Collection)public boolean addAll(ByteCollection c)
AbstractByteBigListThis implementation delegates to the type-specific version of AbstractByteBigList.addAll(long, Collection).
addAll in interface ByteCollectionaddAll in class AbstractByteBigListc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean addAll(long index,
ByteBigList c)
AbstractByteBigListThis implementation delegates to the type-specific version of AbstractByteBigList.addAll(long, Collection).
addAll in interface ByteBigListaddAll in class AbstractByteBigListList.addAll(int,java.util.Collection)public boolean addAll(ByteBigList c)
AbstractByteBigListThis implementation delegates to the type-specific list version of AbstractByteBigList.addAll(long, Collection).
addAll in interface ByteBigListaddAll in class AbstractByteBigListList.addAll(int,java.util.Collection)public boolean containsAll(ByteCollection c)
ByteCollectioncontainsAll in interface ByteCollectioncontainsAll in class AbstractByteCollectionc - a type-specific collection.true if this collection contains all elements of the argument.Collection.containsAll(Collection)public boolean removeAll(ByteCollection c)
ByteCollectionremoveAll in interface ByteCollectionremoveAll in class AbstractByteCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(ByteCollection c)
ByteCollectionretainAll in interface ByteCollectionretainAll in class AbstractByteCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public void add(long index,
byte key)
AbstractByteBigListThis implementation always throws an UnsupportedOperationException.
add in interface ByteBigListadd in class AbstractByteBigListBigList.add(long,Object)public boolean add(byte key)
AbstractByteBigListThis implementation always throws an UnsupportedOperationException.
This implementation delegates to the type-specific version of BigList.add(long, Object).
add in interface ByteCollectionadd in class AbstractByteBigListCollection.add(Object)public byte getByte(long index)
ByteBigListgetByte in interface ByteBigListBigList.get(long)public long indexOf(byte k)
ByteBigListindexOf in interface ByteBigListindexOf in class AbstractByteBigListBigList.indexOf(Object)public long lastIndexOf(byte k)
ByteBigListlastIndexOf in interface ByteBigListlastIndexOf in class AbstractByteBigListBigList.lastIndexOf(Object)public byte removeByte(long index)
AbstractByteBigListThis implementation always throws an UnsupportedOperationException.
removeByte in interface ByteBigListremoveByte in class AbstractByteBigListBigList.remove(long)public byte set(long index,
byte k)
AbstractByteBigListThis implementation always throws an UnsupportedOperationException.
set in interface ByteBigListset in class AbstractByteBigListBigList.set(long,Object)public boolean isEmpty()
StackisEmpty in interface Stack<Byte>isEmpty in interface Collection<Byte>isEmpty in class AbstractCollection<Byte>public <T> T[] toArray(T[] a)
toArray in interface Collection<Byte>toArray in class AbstractCollection<Byte>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<Byte>containsAll in class AbstractCollection<Byte>public boolean addAll(Collection<? extends Byte> c)
AbstractByteBigListThis implementation delegates to the type-specific version of BigList.addAll(long, Collection).
addAll in interface Collection<Byte>addAll in class AbstractByteBigListpublic boolean removeAll(Collection<?> c)
removeAll in interface Collection<Byte>removeAll in class AbstractCollection<Byte>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<Byte>retainAll in class AbstractCollection<Byte>public void clear()
AbstractByteBigListThis implementation delegates to AbstractByteBigList.removeElements(long, long).
clear in interface Collection<Byte>clear in class AbstractByteBigListpublic int hashCode()
AbstractByteBigListList.hashCode().hashCode in interface Collection<Byte>hashCode in class AbstractByteBigListCopyright © 2020. All rights reserved.