Class DoubleBigLists.Singleton
- All Implemented Interfaces:
BigList<Double>,DoubleBigList,DoubleCollection,DoubleIterable,DoubleStack,Size64,Stack<Double>,Serializable,Cloneable,Comparable<BigList<? extends Double>>,Iterable<Double>,Collection<Double>
- Enclosing class:
- DoubleBigLists
public static class DoubleBigLists.Singleton extends AbstractDoubleBigList implements Serializable, Cloneable
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.doubles.AbstractDoubleBigList
AbstractDoubleBigList.DoubleSubList -
Method Summary
Modifier and Type Method Description booleanaddAll(long i, DoubleBigList 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, DoubleCollection 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 Double> c)Adds all of the elements in the specified collection to this list (optional operation).booleanaddAll(DoubleBigList 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(DoubleCollection c)Adds all elements of the given type-specific collection to this collection.booleanaddAll(Collection<? extends Double> c)voidclear()Objectclone()booleancontains(double k)Returns true if this list contains the specified element.doublegetDouble(long i)Returns the element at the specified position.DoubleBigListIteratorlistIterator()Returns a type-specific big-list iterator on this type-specific big list.DoubleBigListIteratorlistIterator(long i)Returns a type-specific list iterator on this type-specific big list starting at a given index.booleanrem(double k)Removes a single instance of the specified element from this collection, if it is present (optional operation).booleanremoveAll(DoubleCollection c)Remove from this collection all elements in the given type-specific collection.booleanremoveAll(Collection<?> c)doubleremoveDouble(long i)Removes the element at the specified position.booleanretainAll(DoubleCollection c)Retains in this collection only elements from the given type-specific collection.booleanretainAll(Collection<?> c)longsize64()Returns the size of this data structure as a long.DoubleBigListsubList(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.double[]toDoubleArray()Returns a primitive type array containing the items of this collection.Methods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleBigList
add, add, add, addElements, addElements, compareTo, equals, get, getElements, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, peek, peekDouble, pop, popDouble, push, push, remove, removeElements, set, set, size, size, top, topDouble, toStringMethods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
add, contains, containsAll, remove, toArray, toDoubleArrayMethods inherited from interface java.util.Collection
containsAll, isEmpty, parallelStream, spliterator, stream, toArray, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleCollection
add, contains, containsAll, remove, removeIf, removeIf, toArray, toDoubleArray
-
Method Details
-
getDouble
public double getDouble(long i)Description copied from interface:DoubleBigListReturns the element at the specified position.- Specified by:
getDoublein interfaceDoubleBigList- See Also:
BigList.get(long)
-
rem
public boolean rem(double k)Description copied from class:AbstractDoubleBigListRemoves a single instance of the specified element from this collection, if it is present (optional operation).This implementation delegates to
indexOf().- Specified by:
remin interfaceDoubleCollection- Overrides:
remin classAbstractDoubleBigList- See Also:
Collection.remove(Object)
-
removeDouble
public double removeDouble(long i)Description copied from class:AbstractDoubleBigListRemoves the element at the specified position.This implementation always throws an
UnsupportedOperationException.- Specified by:
removeDoublein interfaceDoubleBigList- Overrides:
removeDoublein classAbstractDoubleBigList- See Also:
BigList.remove(long)
-
contains
public boolean contains(double k)Description copied from class:AbstractDoubleBigListReturns true if this list contains the specified element.This implementation delegates to
indexOf().- Specified by:
containsin interfaceDoubleCollection- Overrides:
containsin classAbstractDoubleBigList- See Also:
Collection.contains(Object)
-
toDoubleArray
public double[] toDoubleArray()Description copied from interface:DoubleCollectionReturns a primitive type array containing the items of this collection.- Specified by:
toDoubleArrayin interfaceDoubleCollection- Overrides:
toDoubleArrayin classAbstractDoubleCollection- Returns:
- a primitive type array containing the items of this collection.
- See Also:
Collection.toArray()
-
listIterator
Description copied from class:AbstractDoubleBigListReturns a type-specific big-list iterator on this type-specific big list.Note that this specification strengthens the one given in
BigList.listIterator().This implementation delegates to
listIterator(0).- Specified by:
listIteratorin interfaceBigList<Double>- Specified by:
listIteratorin interfaceDoubleBigList- Overrides:
listIteratorin classAbstractDoubleBigList- Returns:
- a big-list iterator over the elements in this big list.
- See Also:
BigList.listIterator()
-
listIterator
Description copied from class:AbstractDoubleBigListReturns a type-specific list iterator on this type-specific big list starting at a given index.Note that this specification strengthens the one given in
BigList.listIterator(long).This implementation is based on the random-access methods.
- Specified by:
listIteratorin interfaceBigList<Double>- Specified by:
listIteratorin interfaceDoubleBigList- Overrides:
listIteratorin classAbstractDoubleBigList- Parameters:
i- index of first element to be returned from the big-list iterator.- Returns:
- a big-list iterator of the elements in this big list, starting at the specified position in this big list.
- See Also:
BigList.listIterator(long)
-
subList
Description copied from interface:DoubleBigListReturns a type-specific view of the portion of this type-specific big list from the indexfrom, inclusive, to the indexto, exclusive.Note that this specification strengthens the one given in
BigList.subList(long,long).- Specified by:
subListin interfaceBigList<Double>- Specified by:
subListin interfaceDoubleBigList- Overrides:
subListin classAbstractDoubleBigList- Parameters:
from- the starting element (inclusive).to- the ending element (exclusive).- Returns:
- a big sublist view of this big list.
- See Also:
BigList.subList(long,long)
-
addAll
Description copied from class:AbstractDoubleBigListAdds all of the elements in the specified collection to this list (optional operation).- Specified by:
addAllin interfaceBigList<Double>- Overrides:
addAllin classAbstractDoubleBigList- Parameters:
i- index at which to insert the first element from the specified collection.c- collection containing elements to be added to this big list.- Returns:
trueif this big list changed as a result of the call- See Also:
List.addAll(int, Collection)
-
addAll
Description copied from class:AbstractDoubleBigListThis implementation delegates to the type-specific version of
BigList.addAll(long, Collection).- Specified by:
addAllin interfaceCollection<Double>- Overrides:
addAllin classAbstractDoubleBigList
-
removeAll
- Specified by:
removeAllin interfaceCollection<Double>- Overrides:
removeAllin classAbstractCollection<Double>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Double>- Overrides:
retainAllin classAbstractCollection<Double>
-
addAll
Description copied from class:AbstractDoubleBigListAppends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).This implementation delegates to the type-specific list version of
AbstractDoubleBigList.addAll(long, Collection).- Specified by:
addAllin interfaceDoubleBigList- Overrides:
addAllin classAbstractDoubleBigList- See Also:
List.addAll(int,java.util.Collection)
-
addAll
Description copied from class:AbstractDoubleBigListInserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).This implementation delegates to the type-specific version of
AbstractDoubleBigList.addAll(long, Collection).- Specified by:
addAllin interfaceDoubleBigList- Overrides:
addAllin classAbstractDoubleBigList- See Also:
List.addAll(int,java.util.Collection)
-
addAll
Description copied from class:AbstractDoubleBigListInserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).This implementation delegates to the type-specific version of
AbstractDoubleBigList.addAll(long, Collection).- Specified by:
addAllin interfaceDoubleBigList- Overrides:
addAllin classAbstractDoubleBigList- See Also:
List.addAll(int,java.util.Collection)
-
addAll
Description copied from class:AbstractDoubleBigListAdds all elements of the given type-specific collection to this collection.This implementation delegates to the type-specific version of
AbstractDoubleBigList.addAll(long, Collection).- Specified by:
addAllin interfaceDoubleCollection- Overrides:
addAllin classAbstractDoubleBigList- Parameters:
c- a type-specific collection.- Returns:
trueif this collection changed as a result of the call.- See Also:
Collection.addAll(Collection)
-
removeAll
Description copied from interface:DoubleCollectionRemove from this collection all elements in the given type-specific collection.- Specified by:
removeAllin interfaceDoubleCollection- Overrides:
removeAllin classAbstractDoubleCollection- 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:DoubleCollectionRetains in this collection only elements from the given type-specific collection.- Specified by:
retainAllin interfaceDoubleCollection- Overrides:
retainAllin classAbstractDoubleCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection changed as a result of the call.- See Also:
Collection.retainAll(Collection)
-
clear
public void clear()Description copied from class:AbstractDoubleBigListThis implementation delegates to
AbstractDoubleBigList.removeElements(long, long).- Specified by:
clearin interfaceCollection<Double>- Overrides:
clearin classAbstractDoubleBigList
-
size64
public long size64()Description copied from interface:Size64Returns the size of this data structure as a long. -
clone
-