Package it.unimi.dsi.fastutil.longs
Class LongBigLists.ListBigList
java.lang.Object
java.util.AbstractCollection<Long>
it.unimi.dsi.fastutil.longs.AbstractLongCollection
it.unimi.dsi.fastutil.longs.AbstractLongBigList
it.unimi.dsi.fastutil.longs.LongBigLists.ListBigList
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<Long>,LongBigList,it.unimi.dsi.fastutil.longs.LongCollection,it.unimi.dsi.fastutil.longs.LongIterable,it.unimi.dsi.fastutil.longs.LongStack,it.unimi.dsi.fastutil.Size64,it.unimi.dsi.fastutil.Stack<Long>,Serializable,Comparable<it.unimi.dsi.fastutil.BigList<? extends Long>>,Iterable<Long>,Collection<Long>
- Enclosing class:
LongBigLists
A class exposing a list as a big list.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.longs.AbstractLongBigList
AbstractLongBigList.LongRandomAccessSubList, AbstractLongBigList.LongSubList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(long key) voidadd(long index, long key) Inserts the specified element at the specified position in this type-specific big list (optional operation).booleanaddAll(long index, LongBigList 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).booleanaddAll(long index, it.unimi.dsi.fastutil.longs.LongCollection c) Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).booleanaddAll(long index, Collection<? extends Long> c) Adds all of the elements in the specified collection to this list (optional operation).booleanAppends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).booleanaddAll(it.unimi.dsi.fastutil.longs.LongCollection c) booleanaddAll(Collection<? extends Long> c) voidclear()booleancontains(long key) Returns true if this list contains the specified element.booleancontainsAll(it.unimi.dsi.fastutil.longs.LongCollection c) booleancontainsAll(Collection<?> c) longgetLong(long index) Returns the element at the specified position.inthashCode()Returns the hash code for this big list, which is identical toList.hashCode().longindexOf(long 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.booleanisEmpty()it.unimi.dsi.fastutil.longs.LongBigListIteratoriterator()Returns a type-specific iterator on the elements of this list.longlastIndexOf(long 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.it.unimi.dsi.fastutil.longs.LongBigListIteratorReturns a type-specific big-list iterator on this type-specific big list.it.unimi.dsi.fastutil.longs.LongBigListIteratorlistIterator(long index) Returns a type-specific list iterator on this type-specific big list starting at a given index.booleanremoveAll(it.unimi.dsi.fastutil.longs.LongCollection c) booleanremoveAll(Collection<?> c) voidremoveElements(long from, long to) Removes (hopefully quickly) elements of this type-specific big list.longremoveLong(long index) Removes the element at the specified position.booleanretainAll(it.unimi.dsi.fastutil.longs.LongCollection c) booleanretainAll(Collection<?> c) longset(long index, long k) Replaces the element at the specified position in this big list with the specified element (optional operation).voidsize(long size) longsize64()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.<T> T[]toArray(T[] a) long[]long[]toLongArray(long[] a) Deprecated.Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongBigList
add, addElements, addElements, compareTo, ensureIndex, ensureRestrictedIndex, equals, forEach, get, getElements, indexOf, lastIndexOf, peek, peekLong, pop, popLong, push, push, rem, remove, set, setElements, size, top, topLong, toStringMethods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection
add, contains, forEach, remove, removeIf, toArrayMethods inherited from class java.util.AbstractCollection
toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongBigList
addAll, addAll, getElements, setElements, setElements, spliteratorMethods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
add, contains, longIterator, longParallelStream, longSpliterator, longStream, parallelStream, remove, removeIf, removeIf, removeIf, stream, toArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongIterable
forEach, forEach
-
Constructor Details
-
ListBigList
protected ListBigList(it.unimi.dsi.fastutil.longs.LongList list)
-
-
Method Details
-
size64
public long size64()- Specified by:
size64in interfaceit.unimi.dsi.fastutil.Size64
-
size
public void size(long size) - Specified by:
sizein interfaceit.unimi.dsi.fastutil.BigList<Long>- Overrides:
sizein classAbstractLongBigList
-
iterator
public it.unimi.dsi.fastutil.longs.LongBigListIterator iterator()Description copied from class:AbstractLongBigListReturns a type-specific iterator on the elements of this list.- Specified by:
iteratorin interfaceCollection<Long>- Specified by:
iteratorin interfaceIterable<Long>- Specified by:
iteratorin interfaceLongBigList- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.longs.LongIterable- Overrides:
iteratorin classAbstractLongBigList- See Also:
-
listIterator
public it.unimi.dsi.fastutil.longs.LongBigListIterator listIterator()Description copied from class:AbstractLongBigListReturns a type-specific big-list iterator on this type-specific big list.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Long>- Specified by:
listIteratorin interfaceLongBigList- Overrides:
listIteratorin classAbstractLongBigList- See Also:
-
listIterator
public it.unimi.dsi.fastutil.longs.LongBigListIterator listIterator(long index) Description copied from class:AbstractLongBigListReturns a type-specific list iterator on this type-specific big list starting at a given index.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Long>- Specified by:
listIteratorin interfaceLongBigList- Overrides:
listIteratorin classAbstractLongBigList- See Also:
-
addAll
Description copied from class:AbstractLongBigListAdds all of the elements in the specified collection to this list (optional operation).- Specified by:
addAllin interfaceit.unimi.dsi.fastutil.BigList<Long>- Overrides:
addAllin classAbstractLongBigList
-
subList
Description copied from interface:LongBigListReturns a type-specific view of the portion of this type-specific big list from the indexfrom, inclusive, to the indexto, exclusive.- Specified by:
subListin interfaceit.unimi.dsi.fastutil.BigList<Long>- Specified by:
subListin interfaceLongBigList- Overrides:
subListin classAbstractLongBigList- See Also:
-
contains
public boolean contains(long key) Description copied from class:AbstractLongBigListReturns true if this list contains the specified element.- Specified by:
containsin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Overrides:
containsin classAbstractLongBigList- See Also:
-
toLongArray
public long[] toLongArray()- Specified by:
toLongArrayin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Overrides:
toLongArrayin classit.unimi.dsi.fastutil.longs.AbstractLongCollection
-
removeElements
public void removeElements(long from, long to) Description copied from class:AbstractLongBigListRemoves (hopefully quickly) elements of this type-specific big list.This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
- Specified by:
removeElementsin interfaceLongBigList- Overrides:
removeElementsin classAbstractLongBigList- Parameters:
from- the start index (inclusive).to- the end index (exclusive).
-
toLongArray
Deprecated.- Specified by:
toLongArrayin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Overrides:
toLongArrayin classit.unimi.dsi.fastutil.longs.AbstractLongCollection
-
addAll
public boolean addAll(long index, it.unimi.dsi.fastutil.longs.LongCollection c) Description copied from class:AbstractLongBigListInserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).- Specified by:
addAllin interfaceLongBigList- Overrides:
addAllin classAbstractLongBigList- See Also:
-
addAll
public boolean addAll(it.unimi.dsi.fastutil.longs.LongCollection c) Description copied from class:AbstractLongBigList- Specified by:
addAllin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Overrides:
addAllin classAbstractLongBigList
-
addAll
Description copied from interface:LongBigListInserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).- Specified by:
addAllin interfaceLongBigList- See Also:
-
addAll
Description copied from interface:LongBigListAppends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).- Specified by:
addAllin interfaceLongBigList- See Also:
-
containsAll
public boolean containsAll(it.unimi.dsi.fastutil.longs.LongCollection c) - Specified by:
containsAllin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Overrides:
containsAllin classit.unimi.dsi.fastutil.longs.AbstractLongCollection
-
removeAll
public boolean removeAll(it.unimi.dsi.fastutil.longs.LongCollection c) - Specified by:
removeAllin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Overrides:
removeAllin classit.unimi.dsi.fastutil.longs.AbstractLongCollection
-
retainAll
public boolean retainAll(it.unimi.dsi.fastutil.longs.LongCollection c) - Specified by:
retainAllin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Overrides:
retainAllin classit.unimi.dsi.fastutil.longs.AbstractLongCollection
-
add
public void add(long index, long key) Description copied from class:AbstractLongBigListInserts the specified element at the specified position in this type-specific big list (optional operation).- Specified by:
addin interfaceLongBigList- Overrides:
addin classAbstractLongBigList- See Also:
-
add
public boolean add(long key) Description copied from class:AbstractLongBigList- Specified by:
addin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Overrides:
addin classAbstractLongBigList
-
getLong
public long getLong(long index) Description copied from interface:LongBigListReturns the element at the specified position.- Specified by:
getLongin interfaceLongBigList- See Also:
-
indexOf
public long indexOf(long k) Description copied from interface:LongBigListReturns 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.- Specified by:
indexOfin interfaceLongBigList- Overrides:
indexOfin classAbstractLongBigList- See Also:
-
lastIndexOf
public long lastIndexOf(long k) Description copied from interface:LongBigListReturns 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.- Specified by:
lastIndexOfin interfaceLongBigList- Overrides:
lastIndexOfin classAbstractLongBigList- See Also:
-
removeLong
public long removeLong(long index) Description copied from class:AbstractLongBigListRemoves the element at the specified position.- Specified by:
removeLongin interfaceLongBigList- Overrides:
removeLongin classAbstractLongBigList- See Also:
-
set
public long set(long index, long k) Description copied from class:AbstractLongBigListReplaces the element at the specified position in this big list with the specified element (optional operation).- Specified by:
setin interfaceLongBigList- Overrides:
setin classAbstractLongBigList- See Also:
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Long>- Specified by:
isEmptyin interfaceit.unimi.dsi.fastutil.Stack<Long>- Overrides:
isEmptyin classAbstractCollection<Long>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<Long>- Overrides:
toArrayin classAbstractCollection<Long>
-
containsAll
- Specified by:
containsAllin interfaceCollection<Long>- Overrides:
containsAllin classit.unimi.dsi.fastutil.longs.AbstractLongCollection
-
addAll
Description copied from class:AbstractLongBigList- Specified by:
addAllin interfaceCollection<Long>- Overrides:
addAllin classAbstractLongBigList
-
removeAll
- Specified by:
removeAllin interfaceCollection<Long>- Overrides:
removeAllin classit.unimi.dsi.fastutil.longs.AbstractLongCollection
-
retainAll
- Specified by:
retainAllin interfaceCollection<Long>- Overrides:
retainAllin classit.unimi.dsi.fastutil.longs.AbstractLongCollection
-
clear
public void clear()Description copied from class:AbstractLongBigList- Specified by:
clearin interfaceCollection<Long>- Overrides:
clearin classAbstractLongBigList
-
hashCode
public int hashCode()Description copied from class:AbstractLongBigListReturns the hash code for this big list, which is identical toList.hashCode().- Specified by:
hashCodein interfaceCollection<Long>- Overrides:
hashCodein classAbstractLongBigList- Returns:
- the hash code for this big list.
-