|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.floats.AbstractFloatCollection
it.unimi.dsi.fastutil.floats.AbstractFloatList
it.unimi.dsi.fastutil.floats.FloatLists.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 inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatList |
AbstractFloatList.FloatSubList |
Field Summary | |
static long |
serialVersionUID
|
Method Summary | |
boolean |
add(float k)
|
void |
add(int i,
float k)
|
boolean |
addAll(Collection c)
Delegates to a more generic method. |
boolean |
addAll(FloatCollection c)
Delegates to a more generic method. |
boolean |
addAll(FloatList c)
Delegates to a more generic method. |
boolean |
addAll(int i,
Collection c)
|
boolean |
addAll(int i,
FloatCollection c)
Delegates to a more generic method. |
boolean |
addAll(int i,
FloatList c)
Delegates to a more generic method. |
boolean |
addAll(int i,
List c)
|
boolean |
addAll(List c)
|
void |
clear()
|
Object |
clone()
|
boolean |
contains(float k)
|
FloatListIterator |
floatListIterator()
Delegates to the corresponding list-iterator method. |
FloatListIterator |
floatListIterator(int i)
Returns a type-specific list iterator on the list starting at a given index. |
FloatList |
floatSubList(int from,
int to)
|
float |
getFloat(int i)
|
boolean |
rem(float 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(FloatCollection c)
Remove from this collection all elements in the given type-specific collection. |
float |
removeFloat(int i)
|
boolean |
retainAll(Collection c)
Retains in this collection only elements from the given collection. |
boolean |
retainAll(FloatCollection 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. |
float[] |
toFloatArray()
Returns a primitive type array containing the items of this collection. |
Methods inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatList |
add, addElements, addElements, compareTo, equals, floatIterator, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekFloat, pop, popFloat, push, push, remove, removeElements, set, set, subList, top, topFloat, toString |
Methods inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatCollection |
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, toArray, toArray, toArray, toFloatArray |
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.floats.FloatCollection |
containsAll, toArray, toFloatArray |
Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
Field Detail |
public static final long serialVersionUID
Method Detail |
public boolean rem(float k)
FloatCollection
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 FloatCollection
rem
in class AbstractFloatList
public boolean add(float k)
add
in interface FloatCollection
add
in class AbstractFloatList
public void add(int i, float k)
add
in interface FloatList
add
in class AbstractFloatList
public float getFloat(int i)
getFloat
in interface FloatList
List.get(int)
public float removeFloat(int i)
removeFloat
in interface FloatList
removeFloat
in class AbstractFloatList
public boolean contains(float k)
contains
in interface FloatCollection
contains
in class AbstractFloatList
public boolean addAll(FloatList c)
AbstractFloatList
addAll
in interface FloatList
addAll
in class AbstractFloatList
public boolean addAll(FloatCollection c)
AbstractFloatList
addAll
in interface FloatCollection
addAll
in class AbstractFloatList
public boolean addAll(int i, FloatList c)
AbstractFloatList
addAll
in interface FloatList
addAll
in class AbstractFloatList
public boolean addAll(int i, FloatCollection c)
AbstractFloatList
addAll
in interface FloatList
addAll
in class AbstractFloatList
public boolean removeAll(FloatCollection c)
AbstractFloatCollection
removeAll
in interface FloatCollection
removeAll
in class AbstractFloatCollection
c
- a type-specific collection.
true
if this collection changed as a result of the call.public boolean retainAll(FloatCollection c)
AbstractFloatCollection
retainAll
in interface FloatCollection
retainAll
in class AbstractFloatCollection
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)
AbstractFloatList
addAll
in interface List
addAll
in class AbstractFloatList
public boolean addAll(int i, List c)
public boolean addAll(int i, Collection c)
addAll
in interface List
addAll
in class AbstractFloatList
public boolean removeAll(Collection c)
AbstractFloatCollection
removeAll
in interface List
removeAll
in class AbstractFloatCollection
c
- a collection.
true
if this collection changed as a result of the call.public boolean retainAll(Collection c)
AbstractFloatCollection
retainAll
in interface List
retainAll
in class AbstractFloatCollection
c
- a collection.
true
if this collection changed as a result of the call.public float[] toFloatArray()
FloatCollection
toFloatArray
in interface FloatCollection
toFloatArray
in class AbstractFloatCollection
public FloatListIterator floatListIterator()
AbstractFloatList
floatListIterator
in interface FloatList
floatListIterator
in class AbstractFloatList
public FloatListIterator floatListIterator(int i)
FloatList
The iterator returned by the List.listIterator()
method and by this
method are identical; however, using this method you can save a type casting.
floatListIterator
in interface FloatList
floatListIterator
in class AbstractFloatList
public FloatList floatSubList(int from, int to)
floatSubList
in interface FloatList
floatSubList
in class AbstractFloatList
public int size()
size
in interface List
public void size(int size)
FloatList
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 FloatList
size
in class AbstractFloatList
public void clear()
clear
in interface List
clear
in class AbstractFloatCollection
public Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |