|
|||||||||
| 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
public static class 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/interfaces inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatList |
|---|
AbstractFloatList.FloatSubList |
| Field Summary | |
|---|---|
static long |
serialVersionUID
|
| Method Summary | |
|---|---|
boolean |
addAll(Collection<? extends Float> c)
Delegates to a more generic method. |
boolean |
addAll(FloatCollection c)
Adds all elements of the given type-specific collection to this collection. |
boolean |
addAll(int i,
Collection<? extends Float> c)
|
boolean |
addAll(int i,
FloatCollection c)
Delegates to a more generic method. |
void |
clear()
|
Object |
clone()
|
boolean |
contains(float k)
|
float |
getFloat(int i)
|
FloatListIterator |
listIterator()
Returns a type-specific list iterator on the list. |
FloatListIterator |
listIterator(int i)
Returns a type-specific list iterator on the list starting at a given index. |
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. |
float |
removeFloat(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. |
FloatList |
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. |
float[] |
toFloatArray()
Returns a primitive type array containing the items of this collection. |
| Methods inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatList |
|---|
add, add, add, addAll, addAll, addElements, addElements, compareTo, equals, floatListIterator, floatListIterator, floatSubList, get, getElements, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, peek, peekFloat, pop, popFloat, push, push, remove, remove, removeElements, set, set, top, topFloat, toString |
| Methods inherited from class it.unimi.dsi.fastutil.floats.AbstractFloatCollection |
|---|
add, contains, containsAll, containsAll, floatIterator, isEmpty, rem, removeAll, retainAll, 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, toArray, toArray |
| Methods inherited from interface it.unimi.dsi.fastutil.floats.FloatCollection |
|---|
containsAll, floatIterator, removeAll, retainAll, toArray, toArray, toFloatArray |
| Methods inherited from interface it.unimi.dsi.fastutil.Stack |
|---|
isEmpty |
| Field Detail |
|---|
public static final long serialVersionUID
| Method Detail |
|---|
public float getFloat(int i)
getFloat in interface FloatListList.get(int)public float removeFloat(int i)
removeFloat in interface FloatListremoveFloat in class AbstractFloatListList.remove(int)public boolean contains(float k)
contains in interface FloatCollectioncontains in class AbstractFloatListCollection.contains(Object)public boolean addAll(Collection<? extends Float> c)
AbstractFloatList
addAll in interface Collection<Float>addAll in interface List<Float>addAll in class AbstractFloatListc - a collection.
true if this collection changed as a result of the call.
public boolean addAll(int i,
Collection<? extends Float> c)
addAll in interface List<Float>addAll in class AbstractFloatListpublic boolean removeAll(Collection<?> c)
AbstractFloatCollection
removeAll in interface Collection<Float>removeAll in interface List<Float>removeAll 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 Collection<Float>retainAll in interface List<Float>retainAll 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 AbstractFloatCollectionCollection.toArray()public FloatListIterator listIterator()
FloatList
listIterator in interface FloatListlistIterator in interface List<Float>listIterator in class AbstractFloatListFloatList.listIterator()public FloatListIterator listIterator(int i)
FloatList
listIterator in interface FloatListlistIterator in interface List<Float>listIterator in class AbstractFloatListFloatList.listIterator(int)
public FloatList subList(int from,
int to)
FloatListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in List.subList(int,int).
subList in interface FloatListsubList in interface List<Float>subList in class AbstractFloatListList.subList(int,int)public int size()
size in interface Collection<Float>size in interface List<Float>public 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 AbstractFloatListsize - the new size.public void clear()
clear in interface Collection<Float>clear in interface List<Float>clear in class AbstractFloatCollectionpublic Object clone()
clone in class Objectpublic 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 AbstractFloatListCollection.remove(Object)public boolean addAll(FloatCollection c)
AbstractFloatCollection
addAll in interface FloatCollectionaddAll in class AbstractFloatListc - a type-specific collection.
true if this collection changed as a result of the call.Collection.addAll(Collection)
public boolean addAll(int i,
FloatCollection c)
AbstractFloatList
addAll in interface FloatListaddAll in class AbstractFloatListList.add(int,Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||