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.
|
Object |
clone()
Clone implementation that returns
this . |
boolean |
contains(float value)
Checks whether this collection contains a specified primitive value.
|
static ImmutableArrayFloatList |
copyOf(Collection<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, toFloatArray
addAll, 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, toString
isEmpty, optimize
finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
addAll, containsAll, containsAll, containsAny, containsAny, removeAll, removeAll, removeAll, removeFirst, retainAll, retainAll, toFloatArray, toFloatArray
containsAny
isEmpty, optimize
public 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(Collection<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 fromIndexOutOfBoundsException
- if the index is invalidpublic boolean contains(float value)
This implementation accesses the internal storage array directly.
contains
in interface FloatCollection
contains
in class AbstractFloatList
value
- the value to search fortrue
if the value is foundpublic Object clone()
this
.clone
in interface PrimitiveCollectable<Float>
clone
in class AbstractPrimitiveCollectable<Float>
this
protected void arrayCopy(int fromIndex, float[] dest, int destIndex, int size)
arrayCopy
in class AbstractFloatList
fromIndex
- the index to start fromdest
- the destination arraydestIndex
- the destination start indexsize
- the number of items to copyCopyright © 2005-2012 Joda.org. All Rights Reserved.