Interface ByteBigList
-
- All Superinterfaces:
BigList<java.lang.Byte>
,ByteCollection
,ByteIterable
,java.util.Collection<java.lang.Byte>
,java.lang.Comparable<BigList<? extends java.lang.Byte>>
,java.lang.Iterable<java.lang.Byte>
,Size64
- All Known Implementing Classes:
AbstractByteBigList
,AbstractByteBigList.ByteSubList
,ByteBigArrayBigList
,ByteBigLists.EmptyBigList
,ByteBigLists.ListBigList
,ByteBigLists.Singleton
,ByteBigLists.SynchronizedBigList
,ByteBigLists.UnmodifiableBigList
public interface ByteBigList extends BigList<java.lang.Byte>, ByteCollection, Size64, java.lang.Comparable<BigList<? extends java.lang.Byte>>
A type-specificBigList
; provides some additional methods that use polymorphism to avoid (un)boxing.Additionally, this interface strengthens
iterator()
,listIterator()
,listIterator(long)
andsubList(long,long)
.Besides polymorphic methods, this interfaces specifies methods to copy into an array or remove contiguous sublists. Although the abstract implementation of this interface provides simple, one-by-one implementations of these methods, it is expected that concrete implementation override them with optimized versions.
- See Also:
List
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
add(long index, byte key)
Inserts the specified element at the specified position in this type-specific big list (optional operation).void
add(long index, java.lang.Byte key)
Deprecated.Please use the corresponding type-specific method instead.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(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).void
addElements(long index, byte[][] a)
Add (hopefully quickly) elements to this type-specific big list.void
addElements(long index, byte[][] a, long offset, long length)
Add (hopefully quickly) elements to this type-specific big list.java.lang.Byte
get(long index)
Deprecated.Please use the corresponding type-specific method instead.byte
getByte(long index)
Returns the element at the specified position.void
getElements(long from, byte[][] a, long offset, long length)
Copies (hopefully quickly) elements of this type-specific big list into the given big array.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.long
indexOf(java.lang.Object o)
Deprecated.Please use the corresponding type-specific method instead.ByteBigListIterator
iterator()
Returns a type-specific iterator on the elements of this list.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.long
lastIndexOf(java.lang.Object o)
Deprecated.Please use the corresponding type-specific method instead.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.java.lang.Byte
remove(long index)
Deprecated.Please use the corresponding type-specific method instead.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.byte
set(long index, byte k)
Replaces the element at the specified position in this big list with the specified element (optional operation).java.lang.Byte
set(long index, java.lang.Byte k)
Deprecated.Please use the corresponding type-specific method instead.ByteBigList
subList(long from, long to)
Returns a type-specific view of the portion of this type-specific big list from the indexfrom
, inclusive, to the indexto
, exclusive.-
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteCollection
add, add, addAll, contains, contains, containsAll, rem, remove, removeAll, removeIf, removeIf, retainAll, toArray, toByteArray, toByteArray
-
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteIterable
forEach, forEach
-
-
-
-
Method Detail
-
iterator
ByteBigListIterator iterator()
Returns a type-specific iterator on the elements of this list.Note that this specification strengthens the one given in
Collection.iterator()
.- Specified by:
iterator
in interfaceByteCollection
- Specified by:
iterator
in interfaceByteIterable
- Specified by:
iterator
in interfacejava.util.Collection<java.lang.Byte>
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.Byte>
- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Collection.iterator()
-
listIterator
ByteBigListIterator listIterator()
Returns a type-specific big-list iterator on this type-specific big list.Note that this specification strengthens the one given in
BigList.listIterator()
.- Specified by:
listIterator
in interfaceBigList<java.lang.Byte>
- Returns:
- a big-list iterator over the elements in this big list.
- See Also:
BigList.listIterator()
-
listIterator
ByteBigListIterator listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.Note that this specification strengthens the one given in
BigList.listIterator(long)
.- Specified by:
listIterator
in interfaceBigList<java.lang.Byte>
- Parameters:
index
- index of first element to be returned from the big-list iterator.- Returns:
- a big-list iterator of the elements in this big list, starting at the specified position in this big list.
- See Also:
BigList.listIterator(long)
-
subList
ByteBigList subList(long from, long to)
Returns a type-specific view of the portion of this type-specific big list from the indexfrom
, inclusive, to the indexto
, exclusive.Note that this specification strengthens the one given in
BigList.subList(long,long)
.- Specified by:
subList
in interfaceBigList<java.lang.Byte>
- Parameters:
from
- the starting element (inclusive).to
- the ending element (exclusive).- Returns:
- a big sublist view of this big list.
- See Also:
BigList.subList(long,long)
-
getElements
void getElements(long from, byte[][] a, long offset, long length)
Copies (hopefully quickly) elements of this type-specific big list into the given big array.- Parameters:
from
- the start index (inclusive).a
- the destination big array.offset
- the offset into the destination big array where to store the first element copied.length
- the number of elements to be copied.
-
removeElements
void removeElements(long from, long to)
Removes (hopefully quickly) elements of this type-specific big list.- Parameters:
from
- the start index (inclusive).to
- the end index (exclusive).
-
addElements
void addElements(long index, byte[][] a)
Add (hopefully quickly) elements to this type-specific big list.- Parameters:
index
- the index at which to add elements.a
- the big array containing the elements.
-
addElements
void addElements(long index, byte[][] a, long offset, long length)
Add (hopefully quickly) elements to this type-specific big list.- Parameters:
index
- the index at which to add elements.a
- the big array containing the elements.offset
- the offset of the first element to add.length
- the number of elements to add.
-
add
void add(long index, byte key)
Inserts the specified element at the specified position in this type-specific big list (optional operation).- See Also:
BigList.add(long,Object)
-
addAll
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).- See Also:
List.addAll(int,java.util.Collection)
-
addAll
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).- See Also:
List.addAll(int,java.util.Collection)
-
addAll
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).- See Also:
List.addAll(int,java.util.Collection)
-
getByte
byte getByte(long index)
Returns the element at the specified position.- See Also:
BigList.get(long)
-
removeByte
byte removeByte(long index)
Removes the element at the specified position.- See Also:
BigList.remove(long)
-
set
byte set(long index, byte k)
Replaces the element at the specified position in this big list with the specified element (optional operation).- See Also:
BigList.set(long,Object)
-
indexOf
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.- See Also:
BigList.indexOf(Object)
-
lastIndexOf
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.- See Also:
BigList.lastIndexOf(Object)
-
add
@Deprecated void add(long index, java.lang.Byte key)
Deprecated.Please use the corresponding type-specific method instead.Inserts the specified element at the specified position in this big list (optional operation).
-
get
@Deprecated java.lang.Byte get(long index)
Deprecated.Please use the corresponding type-specific method instead.Returns the element at the specified position.
-
indexOf
@Deprecated long indexOf(java.lang.Object o)
Deprecated.Please use the corresponding type-specific method instead.Returns the index of the first occurrence of the specified element in this big list, or -1 if this big list does not contain the element.
-
lastIndexOf
@Deprecated long lastIndexOf(java.lang.Object o)
Deprecated.Please use the corresponding type-specific method instead.Returns the index of the last occurrence of the specified element in this big list, or -1 if this big list does not contain the element.- Specified by:
lastIndexOf
in interfaceBigList<java.lang.Byte>
- Parameters:
o
- the object to search for.- Returns:
- the index of the last occurrence of the specified element in this big list, or -1 if this big list does not contain the element.
- See Also:
List.lastIndexOf(Object)
-
remove
@Deprecated java.lang.Byte remove(long index)
Deprecated.Please use the corresponding type-specific method instead.Removes the element at the specified position.
-
set
@Deprecated java.lang.Byte set(long index, java.lang.Byte k)
Deprecated.Please use the corresponding type-specific method instead.Replaces the element at the specified position in this big list with the specified element (optional operation).
-
-