Package it.unimi.dsi.fastutil.booleans
Class BooleanBigLists.ListBigList
java.lang.Object
java.util.AbstractCollection<java.lang.Boolean>
it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
it.unimi.dsi.fastutil.booleans.AbstractBooleanBigList
it.unimi.dsi.fastutil.booleans.BooleanBigLists.ListBigList
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<java.lang.Boolean>,BooleanBigList,BooleanCollection,it.unimi.dsi.fastutil.booleans.BooleanIterable,BooleanStack,it.unimi.dsi.fastutil.Size64,it.unimi.dsi.fastutil.Stack<java.lang.Boolean>,java.io.Serializable,java.lang.Comparable<it.unimi.dsi.fastutil.BigList<? extends java.lang.Boolean>>,java.lang.Iterable<java.lang.Boolean>,java.util.Collection<java.lang.Boolean>
- Enclosing class:
- BooleanBigLists
public static class BooleanBigLists.ListBigList extends AbstractBooleanBigList implements java.io.Serializable
A class exposing a list as a big list.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanBigList
AbstractBooleanBigList.BooleanRandomAccessSubList, AbstractBooleanBigList.BooleanSubList -
Method Summary
Modifier and Type Method Description booleanadd(boolean key)Ensures that this collection contains the specified element (optional operation).voidadd(long index, boolean key)Inserts the specified element at the specified position in this type-specific big list (optional operation).booleanaddAll(long index, 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 index, 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 index, java.util.Collection<? extends java.lang.Boolean> c)Adds all of the elements in the specified collection to this list (optional operation).booleanaddAll(BooleanBigList c)Appends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).booleanaddAll(BooleanCollection c)Adds all elements of the given type-specific collection to this collection.booleanaddAll(java.util.Collection<? extends java.lang.Boolean> c)voidclear()booleancontains(boolean key)Returns true if this list contains the specified element.booleancontainsAll(BooleanCollection c)Checks whether this collection contains all elements from the given type-specific collection.booleancontainsAll(java.util.Collection<?> c)booleangetBoolean(long index)Returns the element at the specified position.inthashCode()Returns the hash code for this big list, which is identical toList.hashCode().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.booleanisEmpty()BooleanBigListIteratoriterator()Returns a type-specific iterator on the elements of this collection.longlastIndexOf(boolean 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.BooleanBigListIteratorlistIterator()Returns a type-specific big-list iterator on this type-specific big list.BooleanBigListIteratorlistIterator(long index)Returns a type-specific list iterator on this type-specific big list starting at a given index.booleanremoveAll(BooleanCollection c)Remove from this collection all elements in the given type-specific collection.booleanremoveAll(java.util.Collection<?> c)booleanremoveBoolean(long index)Removes the element at the specified position.voidremoveElements(long from, long to)Removes (hopefully quickly) elements of this type-specific big list.booleanretainAll(BooleanCollection c)Retains in this collection only elements from the given type-specific collection.booleanretainAll(java.util.Collection<?> c)booleanset(long index, boolean k)Replaces the element at the specified position in this big list with the specified element (optional operation).voidsize(long size)longsize64()BooleanBigListsubList(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)boolean[]toBooleanArray()Returns a primitive type array containing the items of this collection.boolean[]toBooleanArray(boolean[] a)Deprecated.Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanBigList
add, addElements, addElements, compareTo, equals, forEach, get, getElements, indexOf, lastIndexOf, peek, peekBoolean, pop, popBoolean, push, push, rem, remove, set, setElements, size, top, topBoolean, toStringMethods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanCollection
add, contains, remove, toArrayMethods inherited from class java.util.AbstractCollection
toArrayMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanBigList
addAll, addAll, setElements, setElements, spliteratorMethods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanCollection
add, contains, remove, removeIf, removeIf, toArrayMethods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanIterable
forEachMethods inherited from interface java.util.Collection
parallelStream, stream, toArray, toArray
-
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<java.lang.Boolean>- Overrides:
sizein classAbstractBooleanBigList
-
iterator
Description copied from class:AbstractBooleanBigListReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfaceBooleanBigList- Specified by:
iteratorin interfaceBooleanCollection- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.booleans.BooleanIterable- Specified by:
iteratorin interfacejava.util.Collection<java.lang.Boolean>- Specified by:
iteratorin interfacejava.lang.Iterable<java.lang.Boolean>- Overrides:
iteratorin classAbstractBooleanBigList- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Collection.iterator()
-
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<java.lang.Boolean>- Specified by:
listIteratorin interfaceBooleanBigList- Overrides:
listIteratorin classAbstractBooleanBigList- See Also:
BigList.listIterator()
-
listIterator
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<java.lang.Boolean>- Specified by:
listIteratorin interfaceBooleanBigList- Overrides:
listIteratorin classAbstractBooleanBigList- See Also:
BigList.listIterator(long)
-
addAll
public boolean addAll(long index, java.util.Collection<? extends java.lang.Boolean> c)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<java.lang.Boolean>- Overrides:
addAllin classAbstractBooleanBigList
-
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<java.lang.Boolean>- Specified by:
subListin interfaceBooleanBigList- Overrides:
subListin classAbstractBooleanBigList- See Also:
BigList.subList(long,long)
-
contains
public boolean contains(boolean key)Description copied from class:AbstractBooleanBigListReturns true if this list contains the specified element.- Specified by:
containsin interfaceBooleanCollection- Overrides:
containsin classAbstractBooleanBigList- See Also:
Collection.contains(Object)
-
toBooleanArray
public boolean[] toBooleanArray()Description copied from interface:BooleanCollectionReturns a primitive type array containing the items of this collection.- Specified by:
toBooleanArrayin interfaceBooleanCollection- Overrides:
toBooleanArrayin classAbstractBooleanCollection- Returns:
- a primitive type array containing the items of this collection.
- See Also:
Collection.toArray()
-
removeElements
public void removeElements(long from, long to)Description copied from class:AbstractBooleanBigListRemoves (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 interfaceBooleanBigList- Overrides:
removeElementsin classAbstractBooleanBigList- Parameters:
from- the start index (inclusive).to- the end index (exclusive).
-
toBooleanArray
@Deprecated public boolean[] toBooleanArray(boolean[] a)Deprecated.Description copied from class:AbstractBooleanCollectionReturns a primitive type array containing the items of this collection.Note that, contrarily to
Collection.toArray(Object[]), this methods just writes all elements of this collection: no special value will be added after the last one.- Specified by:
toBooleanArrayin interfaceBooleanCollection- Overrides:
toBooleanArrayin classAbstractBooleanCollection- Parameters:
a- if this array is big enough, it will be used to store this collection.- Returns:
- a primitive type array containing the items of this collection.
- See Also:
Collection.toArray(Object[])
-
addAll
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:
List.addAll(int,java.util.Collection)
-
addAll
Description copied from class:AbstractBooleanBigListAdds all elements of the given type-specific collection to this collection.- Specified by:
addAllin interfaceBooleanCollection- Overrides:
addAllin classAbstractBooleanBigList- Parameters:
c- a type-specific collection.- Returns:
trueif this collection changed as a result of the call.- See Also:
Collection.addAll(Collection)
-
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:
BigList.addAll(long,Collection)
-
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:
Collection.addAll(Collection)
-
containsAll
Description copied from interface:BooleanCollectionChecks whether this collection contains all elements from the given type-specific collection.- Specified by:
containsAllin interfaceBooleanCollection- Overrides:
containsAllin classAbstractBooleanCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection contains all elements of the argument.- See Also:
Collection.containsAll(Collection)
-
removeAll
Description copied from interface:BooleanCollectionRemove from this collection all elements in the given type-specific collection.- Specified by:
removeAllin interfaceBooleanCollection- Overrides:
removeAllin classAbstractBooleanCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection changed as a result of the call.- See Also:
Collection.removeAll(Collection)
-
retainAll
Description copied from interface:BooleanCollectionRetains in this collection only elements from the given type-specific collection.- Specified by:
retainAllin interfaceBooleanCollection- Overrides:
retainAllin classAbstractBooleanCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection changed as a result of the call.- See Also:
Collection.retainAll(Collection)
-
add
public void add(long index, boolean key)Description copied from class:AbstractBooleanBigListInserts the specified element at the specified position in this type-specific big list (optional operation).- Specified by:
addin interfaceBooleanBigList- Overrides:
addin classAbstractBooleanBigList- See Also:
BigList.add(long,Object)
-
add
public boolean add(boolean key)Description copied from class:AbstractBooleanBigListEnsures that this collection contains the specified element (optional operation).- Specified by:
addin interfaceBooleanCollection- Overrides:
addin classAbstractBooleanBigList- See Also:
Collection.add(Object)
-
getBoolean
public boolean getBoolean(long index)Description copied from interface:BooleanBigListReturns the element at the specified position.- Specified by:
getBooleanin interfaceBooleanBigList- See Also:
BigList.get(long)
-
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:
BigList.indexOf(Object)
-
lastIndexOf
public long lastIndexOf(boolean k)Description copied from interface:BooleanBigListReturns 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 interfaceBooleanBigList- Overrides:
lastIndexOfin classAbstractBooleanBigList- See Also:
BigList.lastIndexOf(Object)
-
removeBoolean
public boolean removeBoolean(long index)Description copied from class:AbstractBooleanBigListRemoves the element at the specified position.- Specified by:
removeBooleanin interfaceBooleanBigList- Overrides:
removeBooleanin classAbstractBooleanBigList- See Also:
BigList.remove(long)
-
set
public boolean set(long index, boolean k)Description copied from class:AbstractBooleanBigListReplaces the element at the specified position in this big list with the specified element (optional operation).- Specified by:
setin interfaceBooleanBigList- Overrides:
setin classAbstractBooleanBigList- See Also:
BigList.set(long,Object)
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacejava.util.Collection<java.lang.Boolean>- Specified by:
isEmptyin interfaceit.unimi.dsi.fastutil.Stack<java.lang.Boolean>- Overrides:
isEmptyin classjava.util.AbstractCollection<java.lang.Boolean>
-
toArray
public <T> T[] toArray(T[] a)- Specified by:
toArrayin interfacejava.util.Collection<java.lang.Boolean>- Overrides:
toArrayin classjava.util.AbstractCollection<java.lang.Boolean>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)Description copied from class:AbstractBooleanCollection- Specified by:
containsAllin interfacejava.util.Collection<java.lang.Boolean>- Overrides:
containsAllin classAbstractBooleanCollection
-
addAll
public boolean addAll(java.util.Collection<? extends java.lang.Boolean> c)Description copied from class:AbstractBooleanBigList- Specified by:
addAllin interfacejava.util.Collection<java.lang.Boolean>- Overrides:
addAllin classAbstractBooleanBigList
-
removeAll
public boolean removeAll(java.util.Collection<?> c)Description copied from class:AbstractBooleanCollection- Specified by:
removeAllin interfacejava.util.Collection<java.lang.Boolean>- Overrides:
removeAllin classAbstractBooleanCollection
-
retainAll
public boolean retainAll(java.util.Collection<?> c)Description copied from class:AbstractBooleanCollection- Specified by:
retainAllin interfacejava.util.Collection<java.lang.Boolean>- Overrides:
retainAllin classAbstractBooleanCollection
-
clear
public void clear()Description copied from class:AbstractBooleanBigList- Specified by:
clearin interfacejava.util.Collection<java.lang.Boolean>- Overrides:
clearin classAbstractBooleanBigList
-
hashCode
public int hashCode()Description copied from class:AbstractBooleanBigListReturns the hash code for this big list, which is identical toList.hashCode().- Specified by:
hashCodein interfacejava.util.Collection<java.lang.Boolean>- Overrides:
hashCodein classAbstractBooleanBigList- Returns:
- the hash code for this big list.
-