public final class ArrayFloat extends ListFloat implements Serializable
float[]
into a ListFloat
.Constructor and Description |
---|
ArrayFloat(float... array)
A new read-only
ArrayFloat that wraps around the given array. |
ArrayFloat(float[] array,
boolean readOnly)
A new
ArrayFloat that wraps around the given array. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
float |
getFloat(int index)
Returns the element at the specified position in this list casted to a float.
|
IteratorFloat |
iterator()
Returns an iterator over the elements of the collection.
|
void |
setFloat(int index,
float value)
Changes the element at the specified position, casting to the internal
representation.
|
int |
size()
Returns the number of elements in the collection.
|
public ArrayFloat(float... array)
ArrayFloat
that wraps around the given array.array
- an arraypublic ArrayFloat(float[] array, boolean readOnly)
ArrayFloat
that wraps around the given array.array
- an arrayreadOnly
- if false the wrapper allows writes to the arraypublic final IteratorFloat iterator()
CollectionNumber
iterator
in interface CollectionFloat
iterator
in interface CollectionNumber
iterator
in class ListFloat
public final int size()
CollectionNumber
size
in interface CollectionNumber
public float getFloat(int index)
ListNumber
getFloat
in interface ListNumber
index
- position of the element to returnpublic void setFloat(int index, float value)
ListNumber
setFloat
in interface ListNumber
setFloat
in class ListFloat
index
- position of the element to changevalue
- the new valueCopyright © 2015. All rights reserved.