public static class ByteBigLists.ListBigList extends AbstractByteBigList implements Serializable
AbstractByteBigList.ByteSubList
Modifier and Type | Method and Description |
---|---|
boolean |
add(byte key) |
void |
add(long index,
byte key) |
boolean |
addAll(ByteBigList c) |
boolean |
addAll(ByteCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(Collection<? extends Byte> c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
ByteBigList c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
ByteCollection c)
Delegates to a more generic method.
|
boolean |
addAll(long index,
Collection<? extends Byte> c)
Inserts all of the elements in the specified collection into this big list at the specified position (optional operation).
|
void |
clear() |
boolean |
contains(byte key) |
boolean |
containsAll(ByteCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
containsAll(Collection<?> c)
Checks whether this collection contains all elements from the given collection.
|
byte |
getByte(long index) |
int |
hashCode()
Returns the hash code for this big list, which is identical to
List.hashCode() . |
long |
indexOf(byte k) |
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) |
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)
Remove from this collection all elements in the given collection.
|
byte |
removeByte(long index) |
void |
removeElements(long from,
long to)
Removes elements of this type-specific big list one-by-one.
|
boolean |
retainAll(ByteCollection c)
Retains in this collection only elements from the given type-specific collection.
|
boolean |
retainAll(Collection<?> c)
Retains in this collection only elements from the given collection.
|
byte |
set(long index,
byte k) |
int |
size()
Deprecated.
|
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)
Returns an containing the items of this collection;
the runtime type of the returned array is that of the specified array.
|
byte[] |
toByteArray()
Returns a primitive type array containing the items of this collection.
|
byte[] |
toByteArray(byte[] a)
Returns a primitive type array containing the items of this collection.
|
add, addAll, addElements, addElements, compareTo, equals, get, getByte, getElements, indexOf, lastIndexOf, listIterator, peek, peekByte, pop, popByte, push, push, rem, remove, remove, removeByte, set, set, size, top, topByte, toString
add, byteIterator, contains, rem, remove, toArray, toArray
byteIterator, toArray
add, contains, remove, toArray
public long size64()
Size64
@Deprecated public int size()
Size64
Integer.MAX_VALUE
.size
in interface Size64
size
in interface Collection<Byte>
size
in class AbstractByteBigList
Integer.MAX_VALUE
.Collection.size()
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<Byte>
size
in class AbstractByteBigList
size
- the new size.public ByteBigListIterator iterator()
ByteCollection
Note 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
.
iterator
in interface ByteBigList
iterator
in interface ByteCollection
iterator
in interface ByteIterable
iterator
in interface Iterable<Byte>
iterator
in interface Collection<Byte>
iterator
in class AbstractByteBigList
List.iterator()
public ByteBigListIterator listIterator()
ByteBigList
listIterator
in interface BigList<Byte>
listIterator
in interface ByteBigList
listIterator
in class AbstractByteBigList
List.listIterator()
public boolean addAll(long index, Collection<? extends Byte> c)
BigList
addAll
in interface BigList<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 ByteBigListIterator listIterator(long index)
ByteBigList
listIterator
in interface BigList<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 ByteBigList subList(long from, long to)
ByteBigList
from
, 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 ByteBigList
subList
in class AbstractByteBigList
from
- the starting element (inclusive).to
- the ending element (exclusive).BigList.subList(long,long)
public boolean contains(byte key)
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).public byte[] toByteArray(byte[] a)
ByteCollection
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 void add(long index, byte key)
add
in interface ByteBigList
add
in class AbstractByteBigList
List.add(int,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(long index, ByteBigList c)
AbstractByteBigList
addAll
in interface ByteBigList
addAll
in class AbstractByteBigList
List.addAll(int,java.util.Collection)
public boolean add(byte key)
add
in interface ByteCollection
add
in class AbstractByteBigList
Collection.add(Object)
public boolean addAll(ByteBigList c)
addAll
in interface ByteBigList
addAll
in class AbstractByteBigList
List.addAll(int,java.util.Collection)
public byte getByte(long index)
getByte
in interface ByteBigList
BigList.get(long)
public long indexOf(byte k)
indexOf
in interface ByteBigList
indexOf
in class AbstractByteBigList
BigList.indexOf(Object)
public long lastIndexOf(byte k)
lastIndexOf
in interface ByteBigList
lastIndexOf
in class AbstractByteBigList
BigList.lastIndexOf(Object)
public byte removeByte(long index)
removeByte
in interface ByteBigList
removeByte
in class AbstractByteBigList
BigList.remove(long)
public byte set(long index, byte k)
set
in interface ByteBigList
set
in class AbstractByteBigList
BigList.set(long,Object)
public boolean addAll(ByteCollection c)
AbstractByteCollection
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 containsAll(ByteCollection c)
AbstractByteCollection
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)
AbstractByteCollection
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)
AbstractByteCollection
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 boolean isEmpty()
Stack
isEmpty
in interface Stack<Byte>
isEmpty
in interface Collection<Byte>
isEmpty
in class AbstractByteCollection
public <T> T[] toArray(T[] a)
ByteCollection
Warning: 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.
toArray
in interface ByteCollection
toArray
in interface Collection<Byte>
toArray
in class AbstractByteCollection
a
- if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])
public boolean containsAll(Collection<?> c)
AbstractByteCollection
containsAll
in interface Collection<Byte>
containsAll
in class AbstractByteCollection
c
- a collection.true
if this collection contains all elements of the argument.public boolean addAll(Collection<? extends Byte> c)
AbstractByteBigList
addAll
in interface Collection<Byte>
addAll
in class AbstractByteBigList
c
- a collection.true
if this collection changed as a result of the call.public boolean removeAll(Collection<?> c)
AbstractByteCollection
removeAll
in interface Collection<Byte>
removeAll
in class AbstractByteCollection
c
- a collection.true
if this collection changed as a result of the call.public boolean retainAll(Collection<?> c)
AbstractByteCollection
retainAll
in interface Collection<Byte>
retainAll
in class AbstractByteCollection
c
- a collection.true
if this collection changed as a result of the call.public void clear()
clear
in interface Collection<Byte>
clear
in class AbstractCollection<Byte>
public int hashCode()
AbstractByteBigList
List.hashCode()
.hashCode
in interface Collection<Byte>
hashCode
in class AbstractByteBigList