public class IlvFloatArrayList extends Object implements Cloneable, Serializable
float
elements.
It is similar to the java.util.ArrayList
container class,
except that the values are of type float
,Constructor and Description |
---|
IlvFloatArrayList()
Constructs an empty list with an initial capacity of ten.
|
IlvFloatArrayList(float[] initialContents)
Constructs a list containing the elements of the specified array,
|
IlvFloatArrayList(int initialCapacity)
Constructs an empty list with the specified initial capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
add(float value)
Adds the given element to the end of this list.
|
void |
add(int index,
float value)
Adds the given element to this list, at the given position.
|
void |
clear()
Removes all elements from this list.
|
Object |
clone()
Returns a copy of this list.
|
void |
copyInto(float[] array)
Copies the elements of this list into the specified array.
|
void |
ensureCapacity(int minCapacity)
Increases the capacity of this list, if necessary, to ensure that it
can hold at least the number of elements specified by the minimum
capacity argument.
|
boolean |
equals(Object o)
Compares this object to another one.
|
float |
get(int index)
Returns the element at the specified position in this list.
|
int |
hashCode()
Returns a hash code for this object.
|
boolean |
isEmpty()
Returns
true if this list contains no elements. |
float |
remove(int index)
Removes the element at the specified position in this list.
|
void |
removeRange(int fromIndex,
int toIndex)
Removes from this list all of the elements whose index is between
fromIndex , inclusive, and toIndex , exclusive. |
float |
set(int index,
float value)
Replaces the element at the specified position in this list with the
given value.
|
int |
size()
Returns the number of elements in this list.
|
float[] |
toArray()
Returns an array containing all of the elements in this list.
|
String |
toString()
Returns a string representation of this list.
|
void |
trimToSize()
Trims the capacity of this list to the list's current size.
|
public IlvFloatArrayList()
public IlvFloatArrayList(int initialCapacity)
public IlvFloatArrayList(float[] initialContents)
public int size()
public boolean isEmpty()
true
if this list contains no elements.public float get(int index)
IndexOutOfBoundsException
- if the given index is out of range
(index < 0 || index >= size()
).public float set(int index, float value)
IndexOutOfBoundsException
- if the given index is out of range
(index < 0 || index >= size()
).public void copyInto(float[] array)
public float[] toArray()
public void add(float value)
public void add(int index, float value)
IndexOutOfBoundsException
- if the given index is out of range
(index < 0 || index > size()
).public float remove(int index)
IndexOutOfBoundsException
- if the given index is out of range
(index < 0 || index >= size()
).public void removeRange(int fromIndex, int toIndex)
fromIndex
, inclusive, and toIndex
, exclusive.public void clear()
public void trimToSize()
public void ensureCapacity(int minCapacity)
public String toString()
public boolean equals(Object o)
Float.floatToRawIntBits
).public int hashCode()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.