Class DoubleBigLists.Singleton
- java.lang.Object
-
- java.util.AbstractCollection<java.lang.Double>
-
- it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
-
- it.unimi.dsi.fastutil.doubles.AbstractDoubleBigList
-
- it.unimi.dsi.fastutil.doubles.DoubleBigLists.Singleton
-
- All Implemented Interfaces:
BigList<java.lang.Double>
,DoubleBigList
,DoubleCollection
,DoubleIterable
,DoubleStack
,Size64
,Stack<java.lang.Double>
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<BigList<? extends java.lang.Double>>
,java.lang.Iterable<java.lang.Double>
,java.util.Collection<java.lang.Double>
- Enclosing class:
- DoubleBigLists
public static class DoubleBigLists.Singleton extends AbstractDoubleBigList 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.doubles.AbstractDoubleBigList
AbstractDoubleBigList.DoubleSubList
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAll(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).boolean
addAll(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).boolean
addAll(long i, java.util.Collection<? extends java.lang.Double> c)
Adds all of the elements in the specified collection to this list (optional operation).boolean
addAll(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).boolean
addAll(DoubleCollection c)
Adds all elements of the given type-specific collection to this collection.boolean
addAll(java.util.Collection<? extends java.lang.Double> c)
void
clear()
java.lang.Object
clone()
boolean
contains(double k)
Returns true if this list contains the specified element.double
getDouble(long i)
Returns the element at the specified position.DoubleBigListIterator
listIterator()
Returns a type-specific big-list iterator on this type-specific big list.DoubleBigListIterator
listIterator(long i)
Returns a type-specific list iterator on this type-specific big list starting at a given index.boolean
rem(double k)
Removes a single instance of the specified element from this collection, if it is present (optional operation).boolean
removeAll(DoubleCollection c)
Remove from this collection all elements in the given type-specific collection.boolean
removeAll(java.util.Collection<?> c)
double
removeDouble(long i)
Removes the element at the specified position.boolean
retainAll(DoubleCollection c)
Retains in this collection only elements from the given type-specific collection.boolean
retainAll(java.util.Collection<?> c)
long
size64()
Returns the size of this data structure as a long.DoubleBigList
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[]
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, toString
-
Methods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
add, contains, containsAll, remove, toArray, toDoubleArray
-
Methods inherited from interface java.util.Collection
containsAll, isEmpty, parallelStream, spliterator, stream, toArray, toArray, toArray
-
Methods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleCollection
add, contains, containsAll, remove, removeIf, removeIf, toArray, toDoubleArray
-
Methods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleIterable
forEach, forEach
-
-
-
-
Method Detail
-
getDouble
public double getDouble(long i)
Description copied from interface:DoubleBigList
Returns the element at the specified position.- Specified by:
getDouble
in interfaceDoubleBigList
- See Also:
BigList.get(long)
-
rem
public boolean rem(double k)
Description copied from class:AbstractDoubleBigList
Removes a single instance of the specified element from this collection, if it is present (optional operation).This implementation delegates to
indexOf()
.- Specified by:
rem
in interfaceDoubleCollection
- Overrides:
rem
in classAbstractDoubleBigList
- See Also:
Collection.remove(Object)
-
removeDouble
public double removeDouble(long i)
Description copied from class:AbstractDoubleBigList
Removes the element at the specified position.This implementation always throws an
UnsupportedOperationException
.- Specified by:
removeDouble
in interfaceDoubleBigList
- Overrides:
removeDouble
in classAbstractDoubleBigList
- See Also:
BigList.remove(long)
-
contains
public boolean contains(double k)
Description copied from class:AbstractDoubleBigList
Returns true if this list contains the specified element.This implementation delegates to
indexOf()
.- Specified by:
contains
in interfaceDoubleCollection
- Overrides:
contains
in classAbstractDoubleBigList
- See Also:
Collection.contains(Object)
-
toDoubleArray
public double[] toDoubleArray()
Description copied from interface:DoubleCollection
Returns a primitive type array containing the items of this collection.- Specified by:
toDoubleArray
in interfaceDoubleCollection
- Overrides:
toDoubleArray
in classAbstractDoubleCollection
- Returns:
- a primitive type array containing the items of this collection.
- See Also:
Collection.toArray()
-
listIterator
public DoubleBigListIterator listIterator()
Description copied from class:AbstractDoubleBigList
Returns 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:
listIterator
in interfaceBigList<java.lang.Double>
- Specified by:
listIterator
in interfaceDoubleBigList
- Overrides:
listIterator
in classAbstractDoubleBigList
- Returns:
- a big-list iterator over the elements in this big list.
- See Also:
BigList.listIterator()
-
listIterator
public DoubleBigListIterator listIterator(long i)
Description copied from class:AbstractDoubleBigList
Returns 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:
listIterator
in interfaceBigList<java.lang.Double>
- Specified by:
listIterator
in interfaceDoubleBigList
- Overrides:
listIterator
in 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
public DoubleBigList subList(long from, long to)
Description copied from interface:DoubleBigList
Returns 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:
subList
in interfaceBigList<java.lang.Double>
- Specified by:
subList
in interfaceDoubleBigList
- Overrides:
subList
in 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
public boolean addAll(long i, java.util.Collection<? extends java.lang.Double> c)
Description copied from class:AbstractDoubleBigList
Adds all of the elements in the specified collection to this list (optional operation).- Specified by:
addAll
in interfaceBigList<java.lang.Double>
- Overrides:
addAll
in 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:
true
if this big list changed as a result of the call- See Also:
List.addAll(int, Collection)
-
addAll
public boolean addAll(java.util.Collection<? extends java.lang.Double> c)
Description copied from class:AbstractDoubleBigList
This implementation delegates to the type-specific version of
BigList.addAll(long, Collection)
.- Specified by:
addAll
in interfacejava.util.Collection<java.lang.Double>
- Overrides:
addAll
in classAbstractDoubleBigList
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<java.lang.Double>
- Overrides:
removeAll
in classjava.util.AbstractCollection<java.lang.Double>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<java.lang.Double>
- Overrides:
retainAll
in classjava.util.AbstractCollection<java.lang.Double>
-
addAll
public boolean addAll(DoubleBigList c)
Description copied from class:AbstractDoubleBigList
Appends 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:
addAll
in interfaceDoubleBigList
- Overrides:
addAll
in classAbstractDoubleBigList
- See Also:
List.addAll(int,java.util.Collection)
-
addAll
public boolean addAll(long i, DoubleBigList c)
Description copied from class:AbstractDoubleBigList
Inserts 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:
addAll
in interfaceDoubleBigList
- Overrides:
addAll
in classAbstractDoubleBigList
- See Also:
List.addAll(int,java.util.Collection)
-
addAll
public boolean addAll(long i, DoubleCollection c)
Description copied from class:AbstractDoubleBigList
Inserts 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:
addAll
in interfaceDoubleBigList
- Overrides:
addAll
in classAbstractDoubleBigList
- See Also:
List.addAll(int,java.util.Collection)
-
addAll
public boolean addAll(DoubleCollection c)
Description copied from class:AbstractDoubleBigList
Adds 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:
addAll
in interfaceDoubleCollection
- Overrides:
addAll
in classAbstractDoubleBigList
- Parameters:
c
- a type-specific collection.- Returns:
true
if this collection changed as a result of the call.- See Also:
Collection.addAll(Collection)
-
removeAll
public boolean removeAll(DoubleCollection c)
Description copied from interface:DoubleCollection
Remove from this collection all elements in the given type-specific collection.- Specified by:
removeAll
in interfaceDoubleCollection
- Overrides:
removeAll
in classAbstractDoubleCollection
- Parameters:
c
- a type-specific collection.- Returns:
true
if this collection changed as a result of the call.- See Also:
Collection.removeAll(Collection)
-
retainAll
public boolean retainAll(DoubleCollection c)
Description copied from interface:DoubleCollection
Retains in this collection only elements from the given type-specific collection.- Specified by:
retainAll
in interfaceDoubleCollection
- Overrides:
retainAll
in classAbstractDoubleCollection
- Parameters:
c
- a type-specific collection.- Returns:
true
if this collection changed as a result of the call.- See Also:
Collection.retainAll(Collection)
-
clear
public void clear()
Description copied from class:AbstractDoubleBigList
This implementation delegates to
AbstractDoubleBigList.removeElements(long, long)
.- Specified by:
clear
in interfacejava.util.Collection<java.lang.Double>
- Overrides:
clear
in classAbstractDoubleBigList
-
size64
public long size64()
Description copied from interface:Size64
Returns the size of this data structure as a long.
-
clone
public java.lang.Object clone()
-
-