|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.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 |
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, iterator, 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 DoubleListList.get(int)public double removeDouble(int i)
removeDouble in interface DoubleListremoveDouble in class AbstractDoubleListList.remove(int)public boolean contains(double k)
contains in interface DoubleCollectioncontains in class AbstractDoubleListCollection.contains(Object)public boolean addAll(Collection<? extends Double> c)
AbstractDoubleList
addAll in interface Collection<Double>addAll in interface List<Double>addAll in class AbstractDoubleListc - 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 AbstractDoubleListpublic boolean removeAll(Collection<?> c)
AbstractDoubleCollection
removeAll in interface Collection<Double>removeAll in interface List<Double>removeAll in class AbstractDoubleCollectionc - 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 AbstractDoubleCollectionc - a collection.
true if this collection changed as a result of the call.public double[] toDoubleArray()
DoubleCollection
toDoubleArray in interface DoubleCollectiontoDoubleArray in class AbstractDoubleCollectionCollection.toArray()public DoubleListIterator listIterator()
DoubleList
listIterator in interface DoubleListlistIterator in interface List<Double>listIterator in class AbstractDoubleListDoubleList.listIterator()public DoubleListIterator listIterator(int i)
DoubleList
listIterator in interface DoubleListlistIterator in interface List<Double>listIterator in class AbstractDoubleListDoubleList.listIterator(int)
public DoubleList subList(int from,
int to)
DoubleListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in List.subList(int,int).
subList in interface DoubleListsubList in interface List<Double>subList in class AbstractDoubleListList.subList(int,int)public int size()
size in interface Collection<Double>size in interface List<Double>public void size(int size)
DoubleListIf 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 DoubleListsize in class AbstractDoubleListsize - the new size.public void clear()
clear in interface Collection<Double>clear in interface List<Double>clear in class AbstractDoubleCollectionpublic Object clone()
clone in class Objectpublic boolean rem(double k)
DoubleCollectionremove(), 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 DoubleCollectionrem in class AbstractDoubleListCollection.remove(Object)public boolean addAll(DoubleCollection c)
AbstractDoubleCollection
addAll in interface DoubleCollectionaddAll in class AbstractDoubleListc - 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 DoubleListaddAll in class AbstractDoubleListList.add(int,Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||