public class FloatArray
extends java.lang.Object
FloatArray
represents an immutable list of float floating
point values.Constructor | Description |
---|---|
FloatArray(float[] values) |
Constructs an
FloatArray object with the specified
values. |
Modifier and Type | Method | Description |
---|---|---|
float |
get(int index) |
Returns the float at the specified position in this list.
|
boolean |
isEmpty() |
Returns
true if this list has no elements, and returns
false otherwise. |
int |
size() |
Returns the number of elements in this list.
|
float[] |
toArray() |
Returns an integer array containing the sequence of elements in this
list.
|
java.lang.String |
toString() |
Returns a string representation of this list that is
obtained by calling
java.util.Arrays.toString(this.toArray()) . |
public FloatArray(float[] values)
FloatArray
object with the specified
values.values
- the list of floating point valuesjava.lang.NullPointerException
- if values == null
public float get(int index)
index
- the index of the returned floatjava.lang.IndexOutOfBoundsException
- if
index < 0 || index >= size
public int size()
public boolean isEmpty()
true
if this list has no elements, and returns
false
otherwise.true
if this list has no elements, and returns
false
otherwisepublic float[] toArray()
public java.lang.String toString()
java.util.Arrays.toString(this.toArray())
.toString
in class java.lang.Object