public final class ImmutableArrayFloatList extends AbstractFloatList
FloatList for
primitive int elements.
This class implements List allowing
seamless integration with other APIs.
Add, Remove, Set and Clear are not supported as this class is immutable.
AbstractFloatList.PListIterator| Modifier and Type | Method and Description |
|---|---|
protected void |
arrayCopy(int fromIndex,
float[] dest,
int destIndex,
int size)
Copies data from this collection into the specified array.
|
java.lang.Object |
clone()
Clone implementation that returns
this. |
boolean |
contains(float value)
Checks whether this collection contains a specified primitive value.
|
static ImmutableArrayFloatList |
copyOf(java.util.Collection<java.lang.Float> coll)
Creates a list copying the values from the specified collection.
|
static ImmutableArrayFloatList |
copyOf(float[] values)
Creates a list copying the specified array.
|
static ImmutableArrayFloatList |
empty()
Gets a list that is empty.
|
float |
getFloat(int index)
Gets the primitive value at the specified index.
|
int |
size()
Gets the current size of the collection.
|
add, add, add, add, addAll, addAll, addAll, checkIndex, checkIndexExists, checkRange, checkSetModifiable, clear, equals, first, firstFloat, get, hashCode, indexOf, indexOf, indexOf, indexOf, isModifiable, isSetModifiable, iterator, last, lastFloat, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, removeFloat, removeFloatAt, removeRange, set, set, subList, toFloatArrayaddAll, addAll, checkAddModifiable, checkRemoveModifiable, contains, containsAll, containsAll, containsAll, containsAny, containsAny, containsAny, isAddModifiable, isRemoveModifiable, isToPrimitivePossible, remove, removeAll, removeAll, removeAll, removeAll, removeFirst, retainAll, retainAll, retainAll, toArray, toArray, toFloatArray, toFloatArray, toObject, toPrimitive, toPrimitiveArray, toStringisEmpty, optimizefinalize, getClass, notify, notifyAll, wait, wait, waitaddAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayaddAll, containsAll, containsAll, containsAny, containsAny, removeAll, removeAll, removeAll, removeFirst, retainAll, retainAll, toFloatArray, toFloatArraycontainsAnyisEmpty, optimizepublic static ImmutableArrayFloatList empty()
public static ImmutableArrayFloatList copyOf(float[] values)
values - an array of values to copy, null treated as zero size arraypublic static ImmutableArrayFloatList copyOf(java.util.Collection<java.lang.Float> coll)
If the collection is an instance of this class, then it is simply returned.
coll - a collection of values to copy, null treated as zero size collectionpublic int size()
public float getFloat(int index)
index - the index to get fromjava.lang.IndexOutOfBoundsException - if the index is invalidpublic boolean contains(float value)
This implementation accesses the internal storage array directly.
contains in interface FloatCollectioncontains in class AbstractFloatListvalue - the value to search fortrue if the value is foundpublic java.lang.Object clone()
this.clone in interface PrimitiveCollectable<java.lang.Float>clone in class AbstractPrimitiveCollectable<java.lang.Float>thisprotected void arrayCopy(int fromIndex,
float[] dest,
int destIndex,
int size)
arrayCopy in class AbstractFloatListfromIndex - the index to start fromdest - the destination arraydestIndex - the destination start indexsize - the number of items to copyCopyright © 2005–2018 Joda.org. All rights reserved.