Package it.unimi.dsi.fastutil.booleans
Class BooleanBigLists.Singleton
java.lang.Object
java.util.AbstractCollection<Boolean>
it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
it.unimi.dsi.fastutil.booleans.AbstractBooleanBigList
it.unimi.dsi.fastutil.booleans.BooleanBigLists.Singleton
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<Boolean>,BooleanBigList,it.unimi.dsi.fastutil.booleans.BooleanCollection,it.unimi.dsi.fastutil.booleans.BooleanIterable,it.unimi.dsi.fastutil.booleans.BooleanStack,it.unimi.dsi.fastutil.Size64,it.unimi.dsi.fastutil.Stack<Boolean>,Serializable,Cloneable,Comparable<it.unimi.dsi.fastutil.BigList<? extends Boolean>>,Iterable<Boolean>,Collection<Boolean>
- Enclosing class:
BooleanBigLists
public static class BooleanBigLists.Singleton
extends AbstractBooleanBigList
implements Serializable, 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:
-
Nested Class Summary
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanBigList
AbstractBooleanBigList.BooleanRandomAccessSubList, AbstractBooleanBigList.BooleanSubList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAll(long i, BooleanBigList 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 i, it.unimi.dsi.fastutil.booleans.BooleanCollection 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 i, Collection<? extends Boolean> 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.booleans.BooleanCollection c) booleanaddAll(Collection<? extends Boolean> c) voidclear()clone()booleancontains(boolean k) Returns true if this list contains the specified element.booleangetBoolean(long i) Returns the element at the specified position.longindexOf(boolean 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.it.unimi.dsi.fastutil.booleans.BooleanBigListIteratorReturns a type-specific big-list iterator on this type-specific big list.it.unimi.dsi.fastutil.booleans.BooleanBigListIteratorlistIterator(long i) Returns a type-specific list iterator on this type-specific big list starting at a given index.booleanrem(boolean k) Removes a single instance of the specified element from this collection, if it is present (optional operation).booleanremoveAll(it.unimi.dsi.fastutil.booleans.BooleanCollection c) booleanremoveAll(Collection<?> c) booleanremoveBoolean(long i) Removes the element at the specified position.booleanretainAll(it.unimi.dsi.fastutil.booleans.BooleanCollection c) booleanretainAll(Collection<?> c) longsize64()it.unimi.dsi.fastutil.booleans.BooleanSpliteratorReturns a type-specific spliterator on the elements of this big-list.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.boolean[]Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanBigList
add, add, add, addElements, addElements, compareTo, ensureIndex, ensureRestrictedIndex, equals, forEach, get, getElements, hashCode, indexOf, iterator, lastIndexOf, lastIndexOf, peek, peekBoolean, pop, popBoolean, push, push, remove, removeElements, set, set, setElements, size, size, top, topBoolean, toStringMethods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
add, contains, containsAll, containsAll, remove, toArray, toBooleanArrayMethods inherited from class java.util.AbstractCollection
isEmpty, toArray, toArrayMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanBigList
addAll, addAll, getElements, setElements, setElementsMethods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanCollection
add, contains, containsAll, remove, removeIf, removeIf, toArray, toBooleanArrayMethods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanIterable
forEachMethods inherited from interface java.util.Collection
containsAll, isEmpty, parallelStream, stream, toArray, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
-
Constructor Details
-
Singleton
protected Singleton(boolean element)
-
-
Method Details
-
getBoolean
public boolean getBoolean(long i) Description copied from interface:BooleanBigListReturns the element at the specified position.- Specified by:
getBooleanin interfaceBooleanBigList- See Also:
-
rem
public boolean rem(boolean k) Description copied from class:AbstractBooleanBigListRemoves a single instance of the specified element from this collection, if it is present (optional operation).- Specified by:
remin interfaceit.unimi.dsi.fastutil.booleans.BooleanCollection- Overrides:
remin classAbstractBooleanBigList- See Also:
-
removeBoolean
public boolean removeBoolean(long i) Description copied from class:AbstractBooleanBigListRemoves the element at the specified position.- Specified by:
removeBooleanin interfaceBooleanBigList- Overrides:
removeBooleanin classAbstractBooleanBigList- See Also:
-
contains
public boolean contains(boolean k) Description copied from class:AbstractBooleanBigListReturns true if this list contains the specified element.- Specified by:
containsin interfaceit.unimi.dsi.fastutil.booleans.BooleanCollection- Overrides:
containsin classAbstractBooleanBigList- See Also:
-
indexOf
public long indexOf(boolean k) Description copied from interface:BooleanBigListReturns 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 interfaceBooleanBigList- Overrides:
indexOfin classAbstractBooleanBigList- See Also:
-
toBooleanArray
public boolean[] toBooleanArray()- Specified by:
toBooleanArrayin interfaceit.unimi.dsi.fastutil.booleans.BooleanCollection- Overrides:
toBooleanArrayin classit.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
-
listIterator
public it.unimi.dsi.fastutil.booleans.BooleanBigListIterator listIterator()Description copied from class:AbstractBooleanBigListReturns a type-specific big-list iterator on this type-specific big list.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Boolean>- Specified by:
listIteratorin interfaceBooleanBigList- Overrides:
listIteratorin classAbstractBooleanBigList- See Also:
-
listIterator
public it.unimi.dsi.fastutil.booleans.BooleanBigListIterator listIterator(long i) Description copied from class:AbstractBooleanBigListReturns a type-specific list iterator on this type-specific big list starting at a given index.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Boolean>- Specified by:
listIteratorin interfaceBooleanBigList- Overrides:
listIteratorin classAbstractBooleanBigList- See Also:
-
spliterator
public it.unimi.dsi.fastutil.booleans.BooleanSpliterator spliterator()Description copied from interface:BooleanBigListReturns 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 interfaceBooleanBigList- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.booleans.BooleanCollection- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.booleans.BooleanIterable- Specified by:
spliteratorin interfaceCollection<Boolean>- Specified by:
spliteratorin interfaceIterable<Boolean>- Returns:
-
subList
Description copied from interface:BooleanBigListReturns 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<Boolean>- Specified by:
subListin interfaceBooleanBigList- Overrides:
subListin classAbstractBooleanBigList- See Also:
-
addAll
Description copied from class:AbstractBooleanBigListAdds all of the elements in the specified collection to this list (optional operation).- Specified by:
addAllin interfaceit.unimi.dsi.fastutil.BigList<Boolean>- Overrides:
addAllin classAbstractBooleanBigList
-
addAll
Description copied from class:AbstractBooleanBigList- Specified by:
addAllin interfaceCollection<Boolean>- Overrides:
addAllin classAbstractBooleanBigList
-
removeAll
- Specified by:
removeAllin interfaceCollection<Boolean>- Overrides:
removeAllin classit.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
-
retainAll
- Specified by:
retainAllin interfaceCollection<Boolean>- Overrides:
retainAllin classit.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
-
addAll
Description copied from interface:BooleanBigListAppends 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 interfaceBooleanBigList- See Also:
-
addAll
Description copied from interface:BooleanBigListInserts 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 interfaceBooleanBigList- See Also:
-
addAll
public boolean addAll(long i, it.unimi.dsi.fastutil.booleans.BooleanCollection c) Description copied from class:AbstractBooleanBigListInserts 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 interfaceBooleanBigList- Overrides:
addAllin classAbstractBooleanBigList- See Also:
-
addAll
public boolean addAll(it.unimi.dsi.fastutil.booleans.BooleanCollection c) Description copied from class:AbstractBooleanBigList- Specified by:
addAllin interfaceit.unimi.dsi.fastutil.booleans.BooleanCollection- Overrides:
addAllin classAbstractBooleanBigList
-
removeAll
public boolean removeAll(it.unimi.dsi.fastutil.booleans.BooleanCollection c) - Specified by:
removeAllin interfaceit.unimi.dsi.fastutil.booleans.BooleanCollection- Overrides:
removeAllin classit.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
-
retainAll
public boolean retainAll(it.unimi.dsi.fastutil.booleans.BooleanCollection c) - Specified by:
retainAllin interfaceit.unimi.dsi.fastutil.booleans.BooleanCollection- Overrides:
retainAllin classit.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
-
clear
public void clear()Description copied from class:AbstractBooleanBigList- Specified by:
clearin interfaceCollection<Boolean>- Overrides:
clearin classAbstractBooleanBigList
-
size64
public long size64()- Specified by:
size64in interfaceit.unimi.dsi.fastutil.Size64
-
clone
-