Package it.unimi.dsi.fastutil.objects
Class ReferenceBigLists.Singleton<K>
java.lang.Object
java.util.AbstractCollection<K>
it.unimi.dsi.fastutil.objects.AbstractReferenceCollection<K>
it.unimi.dsi.fastutil.objects.AbstractReferenceBigList<K>
it.unimi.dsi.fastutil.objects.ReferenceBigLists.Singleton<K>
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<K>,it.unimi.dsi.fastutil.objects.ObjectIterable<K>,ReferenceBigList<K>,ReferenceCollection<K>,it.unimi.dsi.fastutil.Size64,it.unimi.dsi.fastutil.Stack<K>,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<K>,java.util.Collection<K>
- Enclosing class:
- ReferenceBigLists
public static class ReferenceBigLists.Singleton<K> extends AbstractReferenceBigList<K> implements java.io.Serializable, java.lang.Cloneable
An immutable class representing a type-specific singleton big list.
This class may be useful to implement your own in case you subclass a type-specific big list.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.objects.AbstractReferenceBigList
AbstractReferenceBigList.ReferenceRandomAccessSubList<K>, AbstractReferenceBigList.ReferenceSubList<K> -
Method Summary
Modifier and Type Method Description booleanaddAll(long i, java.util.Collection<? extends K> c)Adds all of the elements in the specified collection to this list (optional operation).booleanaddAll(java.util.Collection<? extends K> c)voidclear()java.lang.Objectclone()booleancontains(java.lang.Object k)Returns true if this list contains the specified element.Kget(long i)longindexOf(java.lang.Object k)it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K>listIterator()Returns a type-specific big-list iterator on this type-specific big list.it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K>listIterator(long i)Returns a type-specific list iterator on this type-specific big list starting at a given index.Kremove(long i)booleanremove(java.lang.Object k)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)longsize64()it.unimi.dsi.fastutil.objects.ObjectSpliterator<K>spliterator()Returns a type-specific spliterator on the elements of this 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.java.lang.Object[]toArray()Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractReferenceBigList
add, add, addElements, addElements, equals, forEach, getElements, hashCode, iterator, lastIndexOf, peek, pop, push, removeElements, set, setElements, size, size, top, toStringMethods inherited from class java.util.AbstractCollection
containsAll, isEmpty, toArrayMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
containsAll, isEmpty, parallelStream, removeIf, stream, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceBigList
addAll, addAll, addAll, addAll, setElements, setElementsMethods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
-
Method Details
-
get
- Specified by:
getin interfaceit.unimi.dsi.fastutil.BigList<K>
-
remove
public boolean remove(java.lang.Object k) -
remove
Description copied from class:AbstractReferenceBigList- Specified by:
removein interfaceit.unimi.dsi.fastutil.BigList<K>- Overrides:
removein classAbstractReferenceBigList<K>
-
contains
public boolean contains(java.lang.Object k)Description copied from class:AbstractReferenceBigListReturns true if this list contains the specified element.- Specified by:
containsin interfacejava.util.Collection<K>- Overrides:
containsin classAbstractReferenceBigList<K>- See Also:
Collection.contains(Object)
-
indexOf
public long indexOf(java.lang.Object k)- Specified by:
indexOfin interfaceit.unimi.dsi.fastutil.BigList<K>- Overrides:
indexOfin classAbstractReferenceBigList<K>
-
toArray
public java.lang.Object[] toArray() -
listIterator
Description copied from class:AbstractReferenceBigListReturns a type-specific big-list iterator on this type-specific big list.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<K>- Specified by:
listIteratorin interfaceReferenceBigList<K>- Overrides:
listIteratorin classAbstractReferenceBigList<K>- See Also:
BigList.listIterator()
-
listIterator
Description copied from class:AbstractReferenceBigListReturns a type-specific list iterator on this type-specific big list starting at a given index.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<K>- Specified by:
listIteratorin interfaceReferenceBigList<K>- Overrides:
listIteratorin classAbstractReferenceBigList<K>- See Also:
BigList.listIterator(long)
-
spliterator
Description copied from interface:ReferenceBigListReturns a type-specific spliterator on the elements of this big-list.BigList spliterators must report at least
Spliterator.SIZEDandSpliterator.ORDERED.See
List.spliterator()for more documentation on the requirements of the returned spliterator (despiteBigListnot being aList, most of the same requirements apply.- Specified by:
spliteratorin interfacejava.util.Collection<K>- Specified by:
spliteratorin interfacejava.lang.Iterable<K>- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.objects.ObjectIterable<K>- Specified by:
spliteratorin interfaceReferenceBigList<K>- Specified by:
spliteratorin interfaceReferenceCollection<K>- Returns:
- a type-specific spliterator on the elements of this collection.
-
subList
Description copied from interface:ReferenceBigListReturns 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<K>- Specified by:
subListin interfaceReferenceBigList<K>- Overrides:
subListin classAbstractReferenceBigList<K>- See Also:
BigList.subList(long,long)
-
addAll
Description copied from class:AbstractReferenceBigListAdds all of the elements in the specified collection to this list (optional operation).- Specified by:
addAllin interfaceit.unimi.dsi.fastutil.BigList<K>- Overrides:
addAllin classAbstractReferenceBigList<K>
-
addAll
Description copied from class:AbstractReferenceBigList- Specified by:
addAllin interfacejava.util.Collection<K>- Overrides:
addAllin classAbstractReferenceBigList<K>
-
removeAll
public boolean removeAll(java.util.Collection<?> c) -
retainAll
public boolean retainAll(java.util.Collection<?> c) -
clear
public void clear()Description copied from class:AbstractReferenceBigList- Specified by:
clearin interfacejava.util.Collection<K>- Overrides:
clearin classAbstractReferenceBigList<K>
-
size64
public long size64()- Specified by:
size64in interfaceit.unimi.dsi.fastutil.Size64
-
clone
public java.lang.Object clone()
-