|
||||||||||
| 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.
| 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)
FloatCollectionremove(), 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 FloatCollectionrem in class AbstractFloatListpublic boolean add(float k)
add in interface FloatCollectionadd in class AbstractFloatCollection
public void add(int i,
float k)
add in interface FloatListadd in class AbstractFloatListpublic float getFloat(int i)
getFloat in interface FloatListList.get(int)public float removeFloat(int i)
removeFloat in interface FloatListremoveFloat in class AbstractFloatListpublic boolean contains(float k)
contains in interface FloatCollectioncontains in class AbstractFloatListpublic boolean addAll(FloatList c)
AbstractFloatList
addAll in interface FloatListaddAll in class AbstractFloatListpublic boolean addAll(FloatCollection c)
AbstractFloatList
addAll in interface FloatCollectionaddAll in class AbstractFloatList
public boolean addAll(int i,
FloatList c)
AbstractFloatList
addAll in interface FloatListaddAll in class AbstractFloatList
public boolean addAll(int i,
FloatCollection c)
AbstractFloatList
addAll in interface FloatListaddAll in class AbstractFloatListpublic boolean removeAll(FloatCollection c)
AbstractFloatCollection
removeAll in interface FloatCollectionremoveAll in class AbstractFloatCollectionc - a type-specific collection.
true if this collection changed as a result of the call.public boolean retainAll(FloatCollection c)
AbstractFloatCollection
retainAll in interface FloatCollectionretainAll in class AbstractFloatCollectionc - 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 ListaddAll in class AbstractFloatList
public boolean addAll(int i,
List c)
public boolean addAll(int i,
Collection c)
addAll in interface ListaddAll in class AbstractFloatListpublic boolean removeAll(Collection c)
AbstractFloatCollection
removeAll in interface ListremoveAll in class AbstractFloatCollectionc - a collection.
true if this collection changed as a result of the call.public boolean retainAll(Collection c)
AbstractFloatCollection
retainAll in interface ListretainAll in class AbstractFloatCollectionc - a collection.
true if this collection changed as a result of the call.public float[] toFloatArray()
FloatCollection
toFloatArray in interface FloatCollectiontoFloatArray in class AbstractFloatCollectionpublic FloatListIterator floatListIterator()
AbstractFloatList
floatListIterator in interface FloatListfloatListIterator in class AbstractFloatListpublic FloatListIterator floatListIterator(int i)
FloatListThe 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 FloatListList.listIterator(int)
public FloatList floatSubList(int from,
int to)
floatSubList in interface FloatListfloatSubList in class AbstractFloatListpublic int size()
size in interface Listpublic void size(int size)
FloatListIf 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 FloatListsize in class AbstractFloatListpublic void clear()
clear in interface Listclear in class AbstractFloatCollectionpublic Object clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||