Interface ReferenceBigList<K>
-
- All Superinterfaces:
BigList<K>
,java.util.Collection<K>
,java.lang.Iterable<K>
,ObjectIterable<K>
,ReferenceCollection<K>
,Size64
- All Known Implementing Classes:
AbstractReferenceBigList
,AbstractReferenceBigList.ReferenceSubList
,ReferenceBigArrayBigList
,ReferenceBigLists.EmptyBigList
,ReferenceBigLists.ListBigList
,ReferenceBigLists.Singleton
,ReferenceBigLists.SynchronizedBigList
,ReferenceBigLists.UnmodifiableBigList
public interface ReferenceBigList<K> extends BigList<K>, ReferenceCollection<K>, Size64
A type-specificBigList
; provides some additional methods that use polymorphism to avoid (un)boxing.Additionally, this interface strengthens
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 Modifier and Type Method Description void
addElements(long index, K[][] a)
Add (hopefully quickly) elements to this type-specific big list.void
addElements(long index, K[][] a, long offset, long length)
Add (hopefully quickly) elements to this type-specific big list.void
getElements(long from, java.lang.Object[][] a, long offset, long length)
Copies (hopefully quickly) elements of this type-specific big list into the given big array.ObjectBigListIterator<K>
iterator()
Returns a type-specific iterator on the elements of this list.ObjectBigListIterator<K>
listIterator()
Returns a type-specific big-list iterator on this type-specific big list.ObjectBigListIterator<K>
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.void
removeElements(long from, long to)
Removes (hopefully quickly) elements of this type-specific big list.ReferenceBigList<K>
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.BigList
add, addAll, get, indexOf, lastIndexOf, remove, set, size, size
-
-
-
-
Method Detail
-
iterator
ObjectBigListIterator<K> 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 interfacejava.util.Collection<K>
- Specified by:
iterator
in interfacejava.lang.Iterable<K>
- Specified by:
iterator
in interfaceObjectIterable<K>
- Specified by:
iterator
in interfaceReferenceCollection<K>
- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Collection.iterator()
-
listIterator
ObjectBigListIterator<K> 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<K>
- Returns:
- a big-list iterator over the elements in this big list.
- See Also:
BigList.listIterator()
-
listIterator
ObjectBigListIterator<K> 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<K>
- 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
ReferenceBigList<K> 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<K>
- 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, java.lang.Object[][] 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, K[][] 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, K[][] 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.
-
-