Package it.unimi.dsi.fastutil.shorts
Class ShortBigLists.ListBigList
java.lang.Object
java.util.AbstractCollection<Short>
it.unimi.dsi.fastutil.shorts.AbstractShortCollection
it.unimi.dsi.fastutil.shorts.AbstractShortBigList
it.unimi.dsi.fastutil.shorts.ShortBigLists.ListBigList
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<Short>,ShortBigList,it.unimi.dsi.fastutil.shorts.ShortCollection,it.unimi.dsi.fastutil.shorts.ShortIterable,it.unimi.dsi.fastutil.shorts.ShortStack,it.unimi.dsi.fastutil.Size64,it.unimi.dsi.fastutil.Stack<Short>,Serializable,Comparable<it.unimi.dsi.fastutil.BigList<? extends Short>>,Iterable<Short>,Collection<Short>
- Enclosing class:
ShortBigLists
A class exposing a list as a big list.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortBigList
AbstractShortBigList.ShortRandomAccessSubList, AbstractShortBigList.ShortSubList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(long index, short key) Inserts the specified element at the specified position in this type-specific big list (optional operation).booleanadd(short key) booleanaddAll(long index, ShortBigList 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.shorts.ShortCollection 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 Short> 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.shorts.ShortCollection c) booleanaddAll(Collection<? extends Short> c) voidclear()booleancontains(short key) Returns true if this list contains the specified element.booleancontainsAll(it.unimi.dsi.fastutil.shorts.ShortCollection c) booleancontainsAll(Collection<?> c) shortgetShort(long index) Returns the element at the specified position.inthashCode()Returns the hash code for this big list, which is identical toList.hashCode().longindexOf(short 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.shorts.ShortBigListIteratoriterator()Returns a type-specific iterator on the elements of this list.longlastIndexOf(short 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.shorts.ShortBigListIteratorReturns a type-specific big-list iterator on this type-specific big list.it.unimi.dsi.fastutil.shorts.ShortBigListIteratorlistIterator(long index) Returns a type-specific list iterator on this type-specific big list starting at a given index.booleanremoveAll(it.unimi.dsi.fastutil.shorts.ShortCollection c) booleanremoveAll(Collection<?> c) voidremoveElements(long from, long to) Removes (hopefully quickly) elements of this type-specific big list.shortremoveShort(long index) Removes the element at the specified position.booleanretainAll(it.unimi.dsi.fastutil.shorts.ShortCollection c) booleanretainAll(Collection<?> c) shortset(long index, short 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) short[]short[]toShortArray(short[] a) Deprecated.Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortBigList
add, addElements, addElements, compareTo, ensureIndex, ensureRestrictedIndex, equals, forEach, get, getElements, indexOf, intSpliterator, lastIndexOf, peek, peekShort, pop, popShort, push, push, rem, remove, set, setElements, size, top, topShort, toStringMethods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortCollection
add, contains, remove, 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.shorts.ShortBigList
addAll, addAll, getElements, setElements, setElements, spliteratorMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortCollection
add, contains, intIterator, intParallelStream, intStream, parallelStream, remove, removeIf, removeIf, removeIf, stream, toArrayMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortIterable
forEach, forEach
-
Constructor Details
-
ListBigList
protected ListBigList(it.unimi.dsi.fastutil.shorts.ShortList 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<Short>- Overrides:
sizein classAbstractShortBigList
-
iterator
public it.unimi.dsi.fastutil.shorts.ShortBigListIterator iterator()Description copied from class:AbstractShortBigListReturns a type-specific iterator on the elements of this list.- Specified by:
iteratorin interfaceCollection<Short>- Specified by:
iteratorin interfaceIterable<Short>- Specified by:
iteratorin interfaceShortBigList- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable- Overrides:
iteratorin classAbstractShortBigList- See Also:
-
listIterator
public it.unimi.dsi.fastutil.shorts.ShortBigListIterator listIterator()Description copied from class:AbstractShortBigListReturns a type-specific big-list iterator on this type-specific big list.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Short>- Specified by:
listIteratorin interfaceShortBigList- Overrides:
listIteratorin classAbstractShortBigList- See Also:
-
listIterator
public it.unimi.dsi.fastutil.shorts.ShortBigListIterator listIterator(long index) Description copied from class:AbstractShortBigListReturns a type-specific list iterator on this type-specific big list starting at a given index.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Short>- Specified by:
listIteratorin interfaceShortBigList- Overrides:
listIteratorin classAbstractShortBigList- See Also:
-
addAll
Description copied from class:AbstractShortBigListAdds all of the elements in the specified collection to this list (optional operation).- Specified by:
addAllin interfaceit.unimi.dsi.fastutil.BigList<Short>- Overrides:
addAllin classAbstractShortBigList
-
subList
Description copied from interface:ShortBigListReturns 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<Short>- Specified by:
subListin interfaceShortBigList- Overrides:
subListin classAbstractShortBigList- See Also:
-
contains
public boolean contains(short key) Description copied from class:AbstractShortBigListReturns true if this list contains the specified element.- Specified by:
containsin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Overrides:
containsin classAbstractShortBigList- See Also:
-
toShortArray
public short[] toShortArray()- Specified by:
toShortArrayin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Overrides:
toShortArrayin classit.unimi.dsi.fastutil.shorts.AbstractShortCollection
-
removeElements
public void removeElements(long from, long to) Description copied from class:AbstractShortBigListRemoves (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 interfaceShortBigList- Overrides:
removeElementsin classAbstractShortBigList- Parameters:
from- the start index (inclusive).to- the end index (exclusive).
-
toShortArray
Deprecated.- Specified by:
toShortArrayin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Overrides:
toShortArrayin classit.unimi.dsi.fastutil.shorts.AbstractShortCollection
-
addAll
public boolean addAll(long index, it.unimi.dsi.fastutil.shorts.ShortCollection c) Description copied from class:AbstractShortBigListInserts 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 interfaceShortBigList- Overrides:
addAllin classAbstractShortBigList- See Also:
-
addAll
public boolean addAll(it.unimi.dsi.fastutil.shorts.ShortCollection c) Description copied from class:AbstractShortBigList- Specified by:
addAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Overrides:
addAllin classAbstractShortBigList
-
addAll
Description copied from interface:ShortBigListInserts 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 interfaceShortBigList- See Also:
-
addAll
Description copied from interface:ShortBigListAppends 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 interfaceShortBigList- See Also:
-
containsAll
public boolean containsAll(it.unimi.dsi.fastutil.shorts.ShortCollection c) - Specified by:
containsAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Overrides:
containsAllin classit.unimi.dsi.fastutil.shorts.AbstractShortCollection
-
removeAll
public boolean removeAll(it.unimi.dsi.fastutil.shorts.ShortCollection c) - Specified by:
removeAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Overrides:
removeAllin classit.unimi.dsi.fastutil.shorts.AbstractShortCollection
-
retainAll
public boolean retainAll(it.unimi.dsi.fastutil.shorts.ShortCollection c) - Specified by:
retainAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Overrides:
retainAllin classit.unimi.dsi.fastutil.shorts.AbstractShortCollection
-
add
public void add(long index, short key) Description copied from class:AbstractShortBigListInserts the specified element at the specified position in this type-specific big list (optional operation).- Specified by:
addin interfaceShortBigList- Overrides:
addin classAbstractShortBigList- See Also:
-
add
public boolean add(short key) Description copied from class:AbstractShortBigList- Specified by:
addin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Overrides:
addin classAbstractShortBigList
-
getShort
public short getShort(long index) Description copied from interface:ShortBigListReturns the element at the specified position.- Specified by:
getShortin interfaceShortBigList- See Also:
-
indexOf
public long indexOf(short k) Description copied from interface:ShortBigListReturns 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 interfaceShortBigList- Overrides:
indexOfin classAbstractShortBigList- See Also:
-
lastIndexOf
public long lastIndexOf(short k) Description copied from interface:ShortBigListReturns 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 interfaceShortBigList- Overrides:
lastIndexOfin classAbstractShortBigList- See Also:
-
removeShort
public short removeShort(long index) Description copied from class:AbstractShortBigListRemoves the element at the specified position.- Specified by:
removeShortin interfaceShortBigList- Overrides:
removeShortin classAbstractShortBigList- See Also:
-
set
public short set(long index, short k) Description copied from class:AbstractShortBigListReplaces the element at the specified position in this big list with the specified element (optional operation).- Specified by:
setin interfaceShortBigList- Overrides:
setin classAbstractShortBigList- See Also:
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Short>- Specified by:
isEmptyin interfaceit.unimi.dsi.fastutil.Stack<Short>- Overrides:
isEmptyin classAbstractCollection<Short>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<Short>- Overrides:
toArrayin classAbstractCollection<Short>
-
containsAll
- Specified by:
containsAllin interfaceCollection<Short>- Overrides:
containsAllin classit.unimi.dsi.fastutil.shorts.AbstractShortCollection
-
addAll
Description copied from class:AbstractShortBigList- Specified by:
addAllin interfaceCollection<Short>- Overrides:
addAllin classAbstractShortBigList
-
removeAll
- Specified by:
removeAllin interfaceCollection<Short>- Overrides:
removeAllin classit.unimi.dsi.fastutil.shorts.AbstractShortCollection
-
retainAll
- Specified by:
retainAllin interfaceCollection<Short>- Overrides:
retainAllin classit.unimi.dsi.fastutil.shorts.AbstractShortCollection
-
clear
public void clear()Description copied from class:AbstractShortBigList- Specified by:
clearin interfaceCollection<Short>- Overrides:
clearin classAbstractShortBigList
-
hashCode
public int hashCode()Description copied from class:AbstractShortBigListReturns the hash code for this big list, which is identical toList.hashCode().- Specified by:
hashCodein interfaceCollection<Short>- Overrides:
hashCodein classAbstractShortBigList- Returns:
- the hash code for this big list.
-