public class TLcdFloatArrayList extends java.util.AbstractList<java.lang.Float> implements java.lang.Cloneable, ILcdFloatList
ILcdFloatList
.Constructor and Description |
---|
TLcdFloatArrayList()
Creates a new, empty
TLcdFloatArrayList . |
TLcdFloatArrayList(int aInitialCapacity)
Creates a new, empty
TLcdFloatArrayList with the specified initial capacity. |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
java.lang.Float element) |
boolean |
addAll(java.util.Collection<? extends java.lang.Float> c) |
boolean |
addAll(int index,
java.util.Collection<? extends java.lang.Float> c) |
boolean |
addAll(int aIndex,
float[] aValues,
int aOffset,
int aLength)
Adds
aLength boolean values from the given array to this list, starting from the given aOffset |
boolean |
addFloat(float aValue)
Appends the specified value to the end of this list (optional operation).
|
void |
addFloat(int aIndex,
float aValue)
Inserts the specified value at the specified position in this list (optional operation).
|
int |
binarySearch(float aKey)
Performs a binary search on this list.
|
void |
clear() |
TLcdFloatArrayList |
clone()
Creates and returns a copy of this object.
|
boolean |
contains(java.lang.Object aO) |
boolean |
containsFloat(float aValue)
Returns
true if this list contains the specified value. |
void |
ensureCapacity(int minCapacity)
Increases the capacity of this list to the specified capacity.
|
java.lang.Float |
get(int index) |
float |
getFloat(int aIndex)
Returns the value at the specified position in this list.
|
int |
indexOf(java.lang.Object aO) |
int |
indexOfFloat(float aValue)
Returns the index of the first occurrence of the specified value in this list, or -1 if this list does not
contain the value.
|
int |
lastIndexOf(java.lang.Object aO) |
int |
lastIndexOfFloat(float aValue)
Returns the index of the last occurrence of the specified value in this list, or -1 if this list does not
contain the value.
|
java.lang.Float |
remove(int index) |
boolean |
removeFloat(float aValue)
Removes the first occurrence of the specified value from this list, if it is present (optional operation).
|
float |
removeFloat(int aIndex)
Removes the value at the specified position in this list (optional operation).
|
java.lang.Float |
set(int index,
java.lang.Float element) |
float |
setFloat(int aIndex,
float aValue)
Replaces the value at the specified position in this list with the specified value (optional operation).
|
int |
size() |
float[] |
toFloatArray()
Returns an array containing all of the values in this list in proper sequence (from first to last value).
|
float[] |
toFloatArray(float[] anArray)
Returns an array containing all of the values in this list in proper sequence (from first to last value);
If the list fits in the specified array, t is returned therein.
|
java.lang.String |
toString() |
void |
trimToSize()
Trims the internal data array of this list to match the size of this list.
|
add, equals, hashCode, iterator, listIterator, listIterator, removeRange, subList
containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, addAll, addAll
public TLcdFloatArrayList()
TLcdFloatArrayList
.public TLcdFloatArrayList(int aInitialCapacity)
TLcdFloatArrayList
with the specified initial capacity.aInitialCapacity
- the initial capacity of this list.public int size()
size
in interface java.util.Collection<java.lang.Float>
size
in interface java.util.List<java.lang.Float>
size
in class java.util.AbstractCollection<java.lang.Float>
public java.lang.Float get(int index)
get
in interface java.util.List<java.lang.Float>
get
in class java.util.AbstractList<java.lang.Float>
public java.lang.Float set(int index, java.lang.Float element)
set
in interface java.util.List<java.lang.Float>
set
in class java.util.AbstractList<java.lang.Float>
public void add(int index, java.lang.Float element)
add
in interface java.util.List<java.lang.Float>
add
in class java.util.AbstractList<java.lang.Float>
public boolean addAll(java.util.Collection<? extends java.lang.Float> c)
addAll
in interface java.util.Collection<java.lang.Float>
addAll
in interface java.util.List<java.lang.Float>
addAll
in class java.util.AbstractCollection<java.lang.Float>
public boolean addAll(int index, java.util.Collection<? extends java.lang.Float> c)
addAll
in interface java.util.List<java.lang.Float>
addAll
in class java.util.AbstractList<java.lang.Float>
public boolean addAll(int aIndex, float[] aValues, int aOffset, int aLength)
ILcdFloatList
aLength
boolean values from the given array to this list, starting from the given aOffset
addAll
in interface ILcdFloatList
aIndex
- The position in this list where to start inserting the given boolean values.aValues
- The array containing the boolean values to add to this listaOffset
- The offset in aValues
from where to start copying the boolean valuesaLength
- The number of boolean values to copy from aValues
to this list.public java.lang.Float remove(int index)
remove
in interface java.util.List<java.lang.Float>
remove
in class java.util.AbstractList<java.lang.Float>
public float getFloat(int aIndex)
ILcdFloatList
getFloat
in interface ILcdFloatList
aIndex
- index of the value to returnpublic float setFloat(int aIndex, float aValue)
ILcdFloatList
setFloat
in interface ILcdFloatList
aIndex
- index of the value to replaceaValue
- value to be stored at the specified positionpublic boolean addFloat(float aValue)
ILcdFloatList
addFloat
in interface ILcdFloatList
aValue
- value to be appended to this listtrue
public void addFloat(int aIndex, float aValue)
ILcdFloatList
addFloat
in interface ILcdFloatList
aIndex
- index at which the specified value is to be insertedaValue
- value to be insertedpublic boolean removeFloat(float aValue)
ILcdFloatList
true
if this list contained the specified value (or equivalently, if this list changed as a
result of the call).removeFloat
in interface ILcdFloatList
aValue
- value to be removed from this list, if presenttrue
if this list contained the specified valuepublic float removeFloat(int aIndex)
ILcdFloatList
removeFloat
in interface ILcdFloatList
aIndex
- the index of the value to be removedpublic float[] toFloatArray()
ILcdFloatList
toFloatArray
in interface ILcdFloatList
public float[] toFloatArray(float[] anArray)
ILcdFloatList
toFloatArray
in interface ILcdFloatList
anArray
- the array into which the values of this list are to be stored, if it is big enough; otherwise,
a new array is allocated for this purpose.public void clear()
clear
in interface java.util.Collection<java.lang.Float>
clear
in interface java.util.List<java.lang.Float>
clear
in class java.util.AbstractList<java.lang.Float>
public int binarySearch(float aKey)
Collections.binarySearch(List, Object)
.
The list must be sorted into ascending order
according to the natural ordering of its
elements (as by the Collections.sort(List)
method) prior to making this
call. If it is not sorted, the results are undefined. If the list
contains multiple elements equal to the specified object, there is no
guarantee which one will be found.aKey
- the value to searchCollections.binarySearch(List, Object)
public TLcdFloatArrayList clone()
ILcdFloatList
clone
in interface ILcdFloatList
clone
in interface ILcdCloneable
clone
in class java.lang.Object
Object.clone()
public void ensureCapacity(int minCapacity)
minCapacity
- the new capacity for this list.public void trimToSize()
public int indexOf(java.lang.Object aO)
indexOf
in interface java.util.List<java.lang.Float>
indexOf
in class java.util.AbstractList<java.lang.Float>
public int indexOfFloat(float aValue)
ILcdFloatList
indexOfFloat
in interface ILcdFloatList
aValue
- value to search forpublic int lastIndexOf(java.lang.Object aO)
lastIndexOf
in interface java.util.List<java.lang.Float>
lastIndexOf
in class java.util.AbstractList<java.lang.Float>
public int lastIndexOfFloat(float aValue)
ILcdFloatList
lastIndexOfFloat
in interface ILcdFloatList
aValue
- value to search forpublic boolean containsFloat(float aValue)
ILcdFloatList
true
if this list contains the specified value.containsFloat
in interface ILcdFloatList
aValue
- value whose presence in this list is to be testedtrue
if this list contains the specified valuepublic boolean contains(java.lang.Object aO)
contains
in interface java.util.Collection<java.lang.Float>
contains
in interface java.util.List<java.lang.Float>
contains
in class java.util.AbstractCollection<java.lang.Float>
public java.lang.String toString()
toString
in class java.util.AbstractCollection<java.lang.Float>