public static class ByteBigLists.ListBigList extends AbstractByteBigList implements java.io.Serializable
AbstractByteBigList.ByteRandomAccessSubList, AbstractByteBigList.ByteSubList
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(java.util.Collection<? extends java.lang.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,
java.util.Collection<? extends java.lang.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(java.util.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(java.util.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(java.util.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, equals, forEach, get, getElements, indexOf, intSpliterator, lastIndexOf, peek, peekByte, pop, popByte, push, push, rem, remove, set, setElements, size, top, topByte, toString
add, contains, remove, toArray
addAll, addAll, setElements, setElements, spliterator
add, contains, intIterator, intParallelStream, intStream, parallelStream, remove, removeIf, removeIf, removeIf, stream, toArray
forEach, forEach
public long size64()
Size64
public void size(long size)
BigList
If 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<java.lang.Byte>
size
in class AbstractByteBigList
size
- the new size.public ByteBigListIterator iterator()
AbstractByteBigList
iterator
in interface ByteBigList
iterator
in interface ByteCollection
iterator
in interface ByteIterable
iterator
in interface java.lang.Iterable<java.lang.Byte>
iterator
in interface java.util.Collection<java.lang.Byte>
iterator
in class AbstractByteBigList
Iterable.iterator()
public ByteBigListIterator listIterator()
AbstractByteBigList
listIterator
in interface BigList<java.lang.Byte>
listIterator
in interface ByteBigList
listIterator
in class AbstractByteBigList
BigList.listIterator()
public ByteBigListIterator listIterator(long index)
AbstractByteBigList
listIterator
in interface BigList<java.lang.Byte>
listIterator
in interface ByteBigList
listIterator
in class AbstractByteBigList
index
- index of first element to be returned from the big-list iterator.BigList.listIterator(long)
public boolean addAll(long index, java.util.Collection<? extends java.lang.Byte> c)
AbstractByteBigList
addAll
in interface BigList<java.lang.Byte>
addAll
in class AbstractByteBigList
index
- 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)
ByteBigList
from
, inclusive, to the index to
, exclusive.subList
in interface BigList<java.lang.Byte>
subList
in interface ByteBigList
subList
in class AbstractByteBigList
from
- the starting element (inclusive).to
- the ending element (exclusive).BigList.subList(long,long)
public boolean contains(byte key)
AbstractByteBigList
contains
in interface ByteCollection
contains
in class AbstractByteBigList
Collection.contains(Object)
public byte[] toByteArray()
ByteCollection
toByteArray
in interface ByteCollection
toByteArray
in class AbstractByteCollection
Collection.toArray()
public void removeElements(long from, long to)
AbstractByteBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface ByteBigList
removeElements
in class AbstractByteBigList
from
- the start index (inclusive).to
- the end index (exclusive).@Deprecated public byte[] toByteArray(byte[] a)
AbstractByteCollection
Note 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 ByteCollection
toByteArray
in class AbstractByteCollection
a
- if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])
public boolean addAll(long index, ByteCollection c)
AbstractByteBigList
addAll
in interface ByteBigList
addAll
in class AbstractByteBigList
List.addAll(int,java.util.Collection)
public boolean addAll(ByteCollection c)
AbstractByteBigList
addAll
in interface ByteCollection
addAll
in class AbstractByteBigList
c
- 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)
ByteBigList
addAll
in interface ByteBigList
BigList.addAll(long,Collection)
public boolean addAll(ByteBigList c)
ByteBigList
addAll
in interface ByteBigList
Collection.addAll(Collection)
public boolean containsAll(ByteCollection c)
ByteCollection
containsAll
in interface ByteCollection
containsAll
in class AbstractByteCollection
c
- a type-specific collection.true
if this collection contains all elements of the argument.Collection.containsAll(Collection)
public boolean removeAll(ByteCollection c)
ByteCollection
removeAll
in interface ByteCollection
removeAll
in class AbstractByteCollection
c
- a type-specific collection.true
if this collection changed as a result of the call.Collection.removeAll(Collection)
public boolean retainAll(ByteCollection c)
ByteCollection
retainAll
in interface ByteCollection
retainAll
in class AbstractByteCollection
c
- 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)
AbstractByteBigList
add
in interface ByteBigList
add
in class AbstractByteBigList
BigList.add(long,Object)
public boolean add(byte key)
AbstractByteBigList
add
in interface ByteCollection
add
in class AbstractByteBigList
Collection.add(Object)
public byte getByte(long index)
ByteBigList
getByte
in interface ByteBigList
BigList.get(long)
public long indexOf(byte k)
ByteBigList
indexOf
in interface ByteBigList
indexOf
in class AbstractByteBigList
BigList.indexOf(Object)
public long lastIndexOf(byte k)
ByteBigList
lastIndexOf
in interface ByteBigList
lastIndexOf
in class AbstractByteBigList
BigList.lastIndexOf(Object)
public byte removeByte(long index)
AbstractByteBigList
removeByte
in interface ByteBigList
removeByte
in class AbstractByteBigList
BigList.remove(long)
public byte set(long index, byte k)
AbstractByteBigList
set
in interface ByteBigList
set
in class AbstractByteBigList
BigList.set(long,Object)
public boolean isEmpty()
Stack
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<java.lang.Byte>
toArray
in class java.util.AbstractCollection<java.lang.Byte>
public boolean containsAll(java.util.Collection<?> c)
AbstractByteCollection
containsAll
in interface java.util.Collection<java.lang.Byte>
containsAll
in class AbstractByteCollection
public boolean addAll(java.util.Collection<? extends java.lang.Byte> c)
AbstractByteBigList
addAll
in interface java.util.Collection<java.lang.Byte>
addAll
in class AbstractByteBigList
public boolean removeAll(java.util.Collection<?> c)
AbstractByteCollection
removeAll
in interface java.util.Collection<java.lang.Byte>
removeAll
in class AbstractByteCollection
public boolean retainAll(java.util.Collection<?> c)
AbstractByteCollection
retainAll
in interface java.util.Collection<java.lang.Byte>
retainAll
in class AbstractByteCollection
public void clear()
AbstractByteBigList
clear
in interface java.util.Collection<java.lang.Byte>
clear
in class AbstractByteBigList
public int hashCode()
AbstractByteBigList
List.hashCode()
.hashCode
in interface java.util.Collection<java.lang.Byte>
hashCode
in class AbstractByteBigList