|
||||||||||
| 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
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.
| Field Summary | |
static long |
serialVersionUID
|
| Method Summary | |
boolean |
add(double k)
|
void |
add(int i,
double k)
|
boolean |
addAll(Collection c)
Delegates to a more generic method. |
boolean |
addAll(DoubleCollection c)
Delegates to a more generic method. |
boolean |
addAll(DoubleList c)
Delegates to a more generic method. |
boolean |
addAll(int i,
Collection c)
|
boolean |
addAll(int i,
DoubleCollection c)
Delegates to a more generic method. |
boolean |
addAll(int i,
DoubleList c)
Delegates to a more generic method. |
boolean |
addAll(int i,
List c)
|
boolean |
addAll(List c)
|
void |
clear()
|
Object |
clone()
|
boolean |
contains(double k)
|
DoubleListIterator |
doubleListIterator()
Delegates to the corresponding list-iterator method. |
DoubleListIterator |
doubleListIterator(int i)
Returns a type-specific list iterator on the list starting at a given index. |
DoubleList |
doubleSubList(int from,
int to)
|
double |
getDouble(int i)
|
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. |
boolean |
removeAll(DoubleCollection c)
Remove from this collection all elements in the given type-specific collection. |
double |
removeDouble(int i)
|
boolean |
retainAll(Collection c)
Retains in this collection only elements from the given collection. |
boolean |
retainAll(DoubleCollection c)
Retains in this collection only elements from the given type-specific collection. |
int |
size()
|
void |
size(int size)
Sets the size of this list. |
double[] |
toDoubleArray()
Returns a primitive type array containing the items of this collection. |
| Methods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleList |
add, addElements, addElements, compareTo, doubleIterator, equals, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekDouble, pop, popDouble, push, push, remove, removeElements, set, set, subList, top, topDouble, toString |
| Methods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection |
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, 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, iterator, remove, toArray, toArray |
| Methods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleCollection |
containsAll, toArray, toDoubleArray |
| Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
| Field Detail |
public static final long serialVersionUID
| Method Detail |
public 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 AbstractDoubleListpublic boolean add(double k)
add in interface DoubleCollectionadd in class AbstractDoubleCollection
public void add(int i,
double k)
add in interface DoubleListadd in class AbstractDoubleListpublic double getDouble(int i)
getDouble in interface DoubleListList.get(int)public double removeDouble(int i)
removeDouble in interface DoubleListremoveDouble in class AbstractDoubleListpublic boolean contains(double k)
contains in interface DoubleCollectioncontains in class AbstractDoubleListpublic boolean addAll(DoubleList c)
AbstractDoubleList
addAll in interface DoubleListaddAll in class AbstractDoubleListpublic boolean addAll(DoubleCollection c)
AbstractDoubleList
addAll in interface DoubleCollectionaddAll in class AbstractDoubleList
public boolean addAll(int i,
DoubleList c)
AbstractDoubleList
addAll in interface DoubleListaddAll in class AbstractDoubleList
public boolean addAll(int i,
DoubleCollection c)
AbstractDoubleList
addAll in interface DoubleListaddAll in class AbstractDoubleListpublic boolean removeAll(DoubleCollection c)
AbstractDoubleCollection
removeAll in interface DoubleCollectionremoveAll in class AbstractDoubleCollectionc - a type-specific collection.
true if this collection changed as a result of the call.public boolean retainAll(DoubleCollection c)
AbstractDoubleCollection
retainAll in interface DoubleCollectionretainAll in class AbstractDoubleCollectionc - a type-specific collection.
true if this collection changed as a result of the call.public boolean addAll(List c)
public boolean addAll(Collection c)
AbstractDoubleList
addAll in interface ListaddAll in class AbstractDoubleList
public boolean addAll(int i,
List c)
public boolean addAll(int i,
Collection c)
addAll in interface ListaddAll in class AbstractDoubleListpublic boolean removeAll(Collection c)
AbstractDoubleCollection
removeAll in interface ListremoveAll 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 ListretainAll 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 AbstractDoubleCollectionpublic DoubleListIterator doubleListIterator()
AbstractDoubleList
doubleListIterator in interface DoubleListdoubleListIterator in class AbstractDoubleListpublic DoubleListIterator doubleListIterator(int i)
DoubleListThe iterator returned by the List.listIterator() method and by this
method are identical; however, using this method you can save a type casting.
doubleListIterator in interface DoubleListList.listIterator(int)
public DoubleList doubleSubList(int from,
int to)
doubleSubList in interface DoubleListdoubleSubList in class AbstractDoubleListpublic int size()
size in interface Listpublic 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 AbstractDoubleListpublic void clear()
clear in interface Listclear in class AbstractDoubleCollectionpublic Object clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||