Package it.unimi.dsi.fastutil.doubles
Class DoubleBigLists.Singleton
java.lang.Object
java.util.AbstractCollection<Double>
it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
it.unimi.dsi.fastutil.doubles.AbstractDoubleBigList
it.unimi.dsi.fastutil.doubles.DoubleBigLists.Singleton
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<Double>,DoubleBigList,it.unimi.dsi.fastutil.doubles.DoubleCollection,it.unimi.dsi.fastutil.doubles.DoubleIterable,it.unimi.dsi.fastutil.doubles.DoubleStack,it.unimi.dsi.fastutil.Size64,it.unimi.dsi.fastutil.Stack<Double>,Serializable,Cloneable,Comparable<it.unimi.dsi.fastutil.BigList<? extends Double>>,Iterable<Double>,Collection<Double>
- Enclosing class:
DoubleBigLists
public static class DoubleBigLists.Singleton
extends AbstractDoubleBigList
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.doubles.AbstractDoubleBigList
AbstractDoubleBigList.DoubleRandomAccessSubList, AbstractDoubleBigList.DoubleSubList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAll(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, it.unimi.dsi.fastutil.doubles.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).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.doubles.DoubleCollection c) booleanaddAll(Collection<? extends Double> c) voidclear()clone()booleancontains(double k) Returns true if this list contains the specified element.doublegetDouble(long i) Returns the element at the specified position.longindexOf(double 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.doubles.DoubleBigListIteratorReturns a type-specific big-list iterator on this type-specific big list.it.unimi.dsi.fastutil.doubles.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(it.unimi.dsi.fastutil.doubles.DoubleCollection c) booleanremoveAll(Collection<?> c) doubleremoveDouble(long i) Removes the element at the specified position.booleanretainAll(it.unimi.dsi.fastutil.doubles.DoubleCollection c) booleanretainAll(Collection<?> c) longsize64()it.unimi.dsi.fastutil.doubles.DoubleSpliteratorReturns 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.double[]Methods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleBigList
add, add, add, addElements, addElements, compareTo, ensureIndex, ensureRestrictedIndex, equals, forEach, get, getElements, hashCode, indexOf, iterator, lastIndexOf, lastIndexOf, peek, peekDouble, pop, popDouble, push, push, remove, removeElements, set, set, setElements, size, size, top, topDouble, toStringMethods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
add, contains, containsAll, containsAll, forEach, remove, removeIf, toArray, toDoubleArrayMethods 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 java.util.Collection
containsAll, isEmpty, toArray, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleBigList
addAll, addAll, getElements, setElements, setElementsMethods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleCollection
add, contains, containsAll, doubleIterator, doubleParallelStream, doubleSpliterator, doubleStream, parallelStream, remove, removeIf, removeIf, removeIf, stream, toArray, toDoubleArrayMethods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleIterable
forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
-
Constructor Details
-
Singleton
protected Singleton(double element)
-
-
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:
-
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).- Specified by:
remin interfaceit.unimi.dsi.fastutil.doubles.DoubleCollection- Overrides:
remin classAbstractDoubleBigList- See Also:
-
removeDouble
public double removeDouble(long i) Description copied from class:AbstractDoubleBigListRemoves the element at the specified position.- Specified by:
removeDoublein interfaceDoubleBigList- Overrides:
removeDoublein classAbstractDoubleBigList- See Also:
-
contains
public boolean contains(double k) Description copied from class:AbstractDoubleBigListReturns true if this list contains the specified element.- Specified by:
containsin interfaceit.unimi.dsi.fastutil.doubles.DoubleCollection- Overrides:
containsin classAbstractDoubleBigList- See Also:
-
indexOf
public long indexOf(double k) Description copied from interface:DoubleBigListReturns 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 interfaceDoubleBigList- Overrides:
indexOfin classAbstractDoubleBigList- See Also:
-
toDoubleArray
public double[] toDoubleArray()- Specified by:
toDoubleArrayin interfaceit.unimi.dsi.fastutil.doubles.DoubleCollection- Overrides:
toDoubleArrayin classit.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
-
listIterator
public it.unimi.dsi.fastutil.doubles.DoubleBigListIterator listIterator()Description copied from class:AbstractDoubleBigListReturns a type-specific big-list iterator on this type-specific big list.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Double>- Specified by:
listIteratorin interfaceDoubleBigList- Overrides:
listIteratorin classAbstractDoubleBigList- See Also:
-
listIterator
public it.unimi.dsi.fastutil.doubles.DoubleBigListIterator listIterator(long i) Description copied from class:AbstractDoubleBigListReturns a type-specific list iterator on this type-specific big list starting at a given index.- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Double>- Specified by:
listIteratorin interfaceDoubleBigList- Overrides:
listIteratorin classAbstractDoubleBigList- See Also:
-
spliterator
public it.unimi.dsi.fastutil.doubles.DoubleSpliterator spliterator()Description copied from interface:DoubleBigListReturns 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 interfaceCollection<Double>- Specified by:
spliteratorin interfaceDoubleBigList- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.doubles.DoubleCollection- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.doubles.DoubleIterable- Specified by:
spliteratorin interfaceIterable<Double>- Returns:
-
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.- Specified by:
subListin interfaceit.unimi.dsi.fastutil.BigList<Double>- Specified by:
subListin interfaceDoubleBigList- Overrides:
subListin classAbstractDoubleBigList- See Also:
-
addAll
Description copied from class:AbstractDoubleBigListAdds all of the elements in the specified collection to this list (optional operation).- Specified by:
addAllin interfaceit.unimi.dsi.fastutil.BigList<Double>- Overrides:
addAllin classAbstractDoubleBigList
-
addAll
Description copied from class:AbstractDoubleBigList- Specified by:
addAllin interfaceCollection<Double>- Overrides:
addAllin classAbstractDoubleBigList
-
removeAll
- Specified by:
removeAllin interfaceCollection<Double>- Overrides:
removeAllin classit.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
-
retainAll
- Specified by:
retainAllin interfaceCollection<Double>- Overrides:
retainAllin classit.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
-
addAll
Description copied from interface:DoubleBigListAppends 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 interfaceDoubleBigList- See Also:
-
addAll
Description copied from interface:DoubleBigListInserts 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 interfaceDoubleBigList- See Also:
-
addAll
public boolean addAll(long i, it.unimi.dsi.fastutil.doubles.DoubleCollection c) 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).- Specified by:
addAllin interfaceDoubleBigList- Overrides:
addAllin classAbstractDoubleBigList- See Also:
-
addAll
public boolean addAll(it.unimi.dsi.fastutil.doubles.DoubleCollection c) Description copied from class:AbstractDoubleBigList- Specified by:
addAllin interfaceit.unimi.dsi.fastutil.doubles.DoubleCollection- Overrides:
addAllin classAbstractDoubleBigList
-
removeAll
public boolean removeAll(it.unimi.dsi.fastutil.doubles.DoubleCollection c) - Specified by:
removeAllin interfaceit.unimi.dsi.fastutil.doubles.DoubleCollection- Overrides:
removeAllin classit.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
-
retainAll
public boolean retainAll(it.unimi.dsi.fastutil.doubles.DoubleCollection c) - Specified by:
retainAllin interfaceit.unimi.dsi.fastutil.doubles.DoubleCollection- Overrides:
retainAllin classit.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
-
clear
public void clear()Description copied from class:AbstractDoubleBigList- Specified by:
clearin interfaceCollection<Double>- Overrides:
clearin classAbstractDoubleBigList
-
size64
public long size64()- Specified by:
size64in interfaceit.unimi.dsi.fastutil.Size64
-
clone
-