public static class FloatLists.Singleton extends AbstractFloatList implements java.util.RandomAccess, java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific list.
AbstractFloatList.FloatSubList| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(java.util.Collection<? extends java.lang.Float> c)
This implementation delegates to the type-specific version of
List.addAll(int, Collection). |
boolean |
addAll(FloatCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(FloatList c)
Appends all of the elements in the specified type-specific list to the end of
this type-specific list (optional operation).
|
boolean |
addAll(int i,
java.util.Collection<? extends java.lang.Float> c)
Adds all of the elements in the specified collection to this list (optional
operation).
|
boolean |
addAll(int i,
FloatCollection c)
Inserts all of the elements in the specified type-specific collection into
this type-specific list at the specified position (optional operation).
|
boolean |
addAll(int i,
FloatList c)
Inserts all of the elements in the specified type-specific list into this
type-specific list at the specified position (optional operation).
|
void |
clear()
This implementation delegates to
AbstractFloatList.removeElements(int, int). |
java.lang.Object |
clone() |
boolean |
contains(float k)
Returns true if this list contains the specified element.
|
float |
getFloat(int i)
Returns the element at the specified position in this list.
|
FloatListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
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)
Removes a single instance of the specified element from this collection, if
it is present (optional operation).
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeAll(FloatCollection c)
Remove from this collection all elements in the given type-specific
collection.
|
float |
removeFloat(int i)
Removes the element at the specified position in this list (optional
operation).
|
boolean |
retainAll(java.util.Collection<?> c) |
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.
|
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.
|
add, add, addElements, addElements, compareTo, equals, getElements, hashCode, indexOf, lastIndexOf, peekFloat, popFloat, push, removeElements, set, topFloat, toStringadd, contains, containsAll, remove, toArray, toFloatArrayadd, add, contains, get, indexOf, lastIndexOf, remove, remove, setcontainsAll, isEmpty, replaceAll, sort, spliterator, toArray, toArraycontainsAll, removeIf, removeIf, toArray, toFloatArrayforEach, forEachpeek, pop, push, toppublic float getFloat(int i)
FloatListpublic boolean rem(float k)
AbstractFloatList
This implementation delegates to indexOf().
rem in interface FloatCollectionrem in class AbstractFloatListList.remove(Object)public float removeFloat(int i)
AbstractFloatList
This implementation always throws an UnsupportedOperationException.
removeFloat in interface FloatListremoveFloat in class AbstractFloatListList.remove(int)public boolean contains(float k)
AbstractFloatList
This implementation delegates to indexOf().
contains in interface FloatCollectioncontains in class AbstractFloatListList.contains(Object)public float[] toFloatArray()
FloatCollectiontoFloatArray in interface FloatCollectiontoFloatArray in class AbstractFloatCollectionCollection.toArray()public FloatListIterator listIterator()
AbstractFloatList
This implementation delegates to listIterator(0).
listIterator in interface FloatListlistIterator in interface java.util.List<java.lang.Float>listIterator in class AbstractFloatListList.listIterator()public FloatListIterator iterator()
AbstractFloatList
Note that this specification strengthens the one given in
Iterable.iterator(), which was already strengthened in the
corresponding type-specific class, but was weakened by the fact that this
interface extends Collection.
This implementation delegates to AbstractFloatList.listIterator().
iterator in interface FloatCollectioniterator in interface FloatIterableiterator in interface FloatListiterator in interface java.lang.Iterable<java.lang.Float>iterator in interface java.util.Collection<java.lang.Float>iterator in interface java.util.List<java.lang.Float>iterator in class AbstractFloatListIterable.iterator()public FloatListIterator listIterator(int i)
AbstractFloatListThis implementation is based on the random-access methods.
listIterator in interface FloatListlistIterator in interface java.util.List<java.lang.Float>listIterator in class AbstractFloatListList.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 java.util.List<java.lang.Float>subList in class AbstractFloatListList.subList(int,int)public boolean addAll(int i,
java.util.Collection<? extends java.lang.Float> c)
AbstractFloatListaddAll in interface java.util.List<java.lang.Float>addAll in class AbstractFloatListpublic boolean addAll(java.util.Collection<? extends java.lang.Float> c)
AbstractFloatList
This implementation delegates to the type-specific version of
List.addAll(int, Collection).
addAll in interface java.util.Collection<java.lang.Float>addAll in interface java.util.List<java.lang.Float>addAll in class AbstractFloatListpublic boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Float>removeAll in interface java.util.List<java.lang.Float>removeAll in class java.util.AbstractCollection<java.lang.Float>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Float>retainAll in interface java.util.List<java.lang.Float>retainAll in class java.util.AbstractCollection<java.lang.Float>public boolean addAll(FloatList c)
AbstractFloatList
This implementation delegates to the type-specific list version of
List.addAll(int, Collection).
addAll in interface FloatListaddAll in class AbstractFloatListList.add(int,Object)public boolean addAll(int i,
FloatList c)
AbstractFloatList
This implementation delegates to the type-specific version of
List.addAll(int, Collection).
addAll in interface FloatListaddAll in class AbstractFloatListList.add(int,Object)public boolean addAll(int i,
FloatCollection c)
FloatListaddAll in interface FloatListaddAll in class AbstractFloatListList.addAll(int,java.util.Collection)public boolean addAll(FloatCollection c)
AbstractFloatList
This implementation delegates to the type-specific version of
List.addAll(int, Collection).
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 removeAll(FloatCollection c)
FloatCollectionremoveAll in interface FloatCollectionremoveAll in class AbstractFloatCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(FloatCollection c)
FloatCollectionretainAll in interface FloatCollectionretainAll in class AbstractFloatCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public int size()
size in interface java.util.Collection<java.lang.Float>size in interface java.util.List<java.lang.Float>size in class java.util.AbstractCollection<java.lang.Float>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 FloatListsize in class AbstractFloatListsize - the new size.public void clear()
AbstractFloatList
This implementation delegates to AbstractFloatList.removeElements(int, int).
clear in interface java.util.Collection<java.lang.Float>clear in interface java.util.List<java.lang.Float>clear in class AbstractFloatListpublic java.lang.Object clone()
clone in class java.lang.Object