|
||||||||||
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)
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
public boolean add(double k)
add
in interface DoubleCollection
add
in class AbstractDoubleCollection
public void add(int i, double k)
add
in interface DoubleList
add
in class AbstractDoubleList
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
public boolean contains(double k)
contains
in interface DoubleCollection
contains
in class AbstractDoubleList
public boolean addAll(DoubleList c)
AbstractDoubleList
addAll
in interface DoubleList
addAll
in class AbstractDoubleList
public boolean addAll(DoubleCollection c)
AbstractDoubleList
addAll
in interface DoubleCollection
addAll
in class AbstractDoubleList
public boolean addAll(int i, DoubleList c)
AbstractDoubleList
addAll
in interface DoubleList
addAll
in class AbstractDoubleList
public boolean addAll(int i, DoubleCollection c)
AbstractDoubleList
addAll
in interface DoubleList
addAll
in class AbstractDoubleList
public boolean removeAll(DoubleCollection c)
AbstractDoubleCollection
removeAll
in interface DoubleCollection
removeAll
in class AbstractDoubleCollection
c
- a type-specific collection.
true
if this collection changed as a result of the call.public boolean retainAll(DoubleCollection c)
AbstractDoubleCollection
retainAll
in interface DoubleCollection
retainAll
in class AbstractDoubleCollection
c
- 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 List
addAll
in class AbstractDoubleList
public boolean addAll(int i, List c)
public boolean addAll(int i, Collection c)
addAll
in interface List
addAll
in class AbstractDoubleList
public boolean removeAll(Collection c)
AbstractDoubleCollection
removeAll
in interface List
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 List
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
public DoubleListIterator doubleListIterator()
AbstractDoubleList
doubleListIterator
in interface DoubleList
doubleListIterator
in class AbstractDoubleList
public DoubleListIterator doubleListIterator(int i)
DoubleList
The 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 DoubleList
List.listIterator(int)
public DoubleList doubleSubList(int from, int to)
doubleSubList
in interface DoubleList
doubleSubList
in class AbstractDoubleList
public int size()
size
in interface List
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
public void clear()
clear
in interface List
clear
in class AbstractDoubleCollection
public Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |