|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<Double>
it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
it.unimi.dsi.fastutil.doubles.AbstractDoubleList
it.unimi.dsi.fastutil.doubles.DoubleLists.Singleton
public static class DoubleLists.Singleton
An immutable class representing a type-specific singleton list.
This class may be useful to implement your own in case you subclass a type-specific list.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleList |
---|
AbstractDoubleList.DoubleSubList |
Field Summary | |
---|---|
static long |
serialVersionUID
|
Method Summary | |
---|---|
boolean |
addAll(Collection<? extends Double> c)
Delegates to a more generic method. |
boolean |
addAll(DoubleCollection c)
Adds all elements of the given type-specific collection to this collection. |
boolean |
addAll(int i,
Collection<? extends Double> c)
|
boolean |
addAll(int i,
DoubleCollection c)
Delegates to a more generic method. |
void |
clear()
|
Object |
clone()
|
boolean |
contains(double k)
|
double |
getDouble(int i)
|
DoubleListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection. |
DoubleListIterator |
listIterator()
Returns a type-specific list iterator on the list. |
DoubleListIterator |
listIterator(int i)
Returns a type-specific list iterator on the list starting at a given index. |
boolean |
rem(double k)
Note that this method should be called remove() , but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. |
boolean |
removeAll(Collection<?> c)
Remove from this collection all elements in the given collection. |
double |
removeDouble(int i)
|
boolean |
retainAll(Collection<?> c)
Retains in this collection only elements from the given collection. |
int |
size()
|
void |
size(int size)
Sets the size of this list. |
DoubleList |
subList(int from,
int to)
Returns a type-specific view of the portion of this list from the index from , inclusive, to the index to , exclusive. |
double[] |
toDoubleArray()
Returns a primitive type array containing the items of this collection. |
Methods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleList |
---|
add, add, add, addAll, addAll, addElements, addElements, compareTo, doubleListIterator, doubleListIterator, doubleSubList, equals, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, peek, peekDouble, pop, popDouble, push, push, remove, remove, removeElements, set, set, top, topDouble, toString |
Methods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection |
---|
add, contains, containsAll, containsAll, doubleIterator, isEmpty, rem, removeAll, retainAll, toArray, toArray, toArray, toDoubleArray |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
add, contains, containsAll, isEmpty, toArray, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleCollection |
---|
containsAll, doubleIterator, removeAll, retainAll, toArray, toArray, toDoubleArray |
Methods inherited from interface it.unimi.dsi.fastutil.Stack |
---|
isEmpty |
Field Detail |
---|
public static final long serialVersionUID
Method Detail |
---|
public double getDouble(int i)
getDouble
in interface DoubleList
List.get(int)
public double removeDouble(int i)
removeDouble
in interface DoubleList
removeDouble
in class AbstractDoubleList
List.remove(int)
public boolean contains(double k)
contains
in interface DoubleCollection
contains
in class AbstractDoubleList
Collection.contains(Object)
public boolean addAll(Collection<? extends Double> c)
AbstractDoubleList
addAll
in interface Collection<Double>
addAll
in interface List<Double>
addAll
in class AbstractDoubleList
c
- a collection.
true
if this collection changed as a result of the call.public boolean addAll(int i, Collection<? extends Double> c)
addAll
in interface List<Double>
addAll
in class AbstractDoubleList
public boolean removeAll(Collection<?> c)
AbstractDoubleCollection
removeAll
in interface Collection<Double>
removeAll
in interface List<Double>
removeAll
in class AbstractDoubleCollection
c
- a collection.
true
if this collection changed as a result of the call.public boolean retainAll(Collection<?> c)
AbstractDoubleCollection
retainAll
in interface Collection<Double>
retainAll
in interface List<Double>
retainAll
in class AbstractDoubleCollection
c
- a collection.
true
if this collection changed as a result of the call.public double[] toDoubleArray()
DoubleCollection
toDoubleArray
in interface DoubleCollection
toDoubleArray
in class AbstractDoubleCollection
Collection.toArray()
public DoubleListIterator listIterator()
DoubleList
listIterator
in interface DoubleList
listIterator
in interface List<Double>
listIterator
in class AbstractDoubleList
List.listIterator()
public DoubleListIterator iterator()
DoubleCollection
Note that this specification strengthens the one given in
Iterable.iterator()
, which was already
strengthened in the corresponding type-specific class,
but was weakened by the fact that this interface extends Collection
.
iterator
in interface DoubleCollection
iterator
in interface DoubleIterable
iterator
in interface DoubleList
iterator
in interface Iterable<Double>
iterator
in interface Collection<Double>
iterator
in interface List<Double>
iterator
in class AbstractDoubleList
public DoubleListIterator listIterator(int i)
DoubleList
listIterator
in interface DoubleList
listIterator
in interface List<Double>
listIterator
in class AbstractDoubleList
List.listIterator(int)
public DoubleList subList(int from, int to)
DoubleList
from
, inclusive, to the index to
, exclusive.
Note that this specification strengthens the one given in List.subList(int,int)
.
subList
in interface DoubleList
subList
in interface List<Double>
subList
in class AbstractDoubleList
List.subList(int,int)
public int size()
size
in interface Collection<Double>
size
in interface List<Double>
size
in class AbstractCollection<Double>
public void size(int size)
DoubleList
If the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null
/false
.
size
in interface DoubleList
size
in class AbstractDoubleList
size
- the new size.public void clear()
clear
in interface Collection<Double>
clear
in interface List<Double>
clear
in class AbstractCollection<Double>
public Object clone()
clone
in class Object
public boolean rem(double k)
DoubleCollection
remove()
, but the clash
with the similarly named index-based method in the List
interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates
remove()
.
rem
in interface DoubleCollection
rem
in class AbstractDoubleList
Collection.remove(Object)
public boolean addAll(DoubleCollection c)
AbstractDoubleCollection
addAll
in interface DoubleCollection
addAll
in class AbstractDoubleList
c
- a type-specific collection.
true
if this collection changed as a result of the call.Collection.addAll(Collection)
public boolean addAll(int i, DoubleCollection c)
AbstractDoubleList
addAll
in interface DoubleList
addAll
in class AbstractDoubleList
List.add(int,Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |