public class TLcdBooleanArrayList extends AbstractList<Boolean> implements Cloneable, ILcdBooleanList
ILcdBooleanList
.modCount
Constructor and Description |
---|
TLcdBooleanArrayList()
Creates a new, empty
TLcdBooleanArrayList . |
TLcdBooleanArrayList(int aInitialCapacity)
Creates a new, empty
TLcdBooleanArrayList with the specified initial capacity. |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Boolean element) |
boolean |
addAll(Collection<? extends Boolean> c) |
boolean |
addAll(int aIndex,
boolean[] aValues,
int aOffset,
int aLength)
Adds
aLength boolean values from the given array to this list, starting from the given aOffset |
boolean |
addAll(int index,
Collection<? extends Boolean> c) |
boolean |
addBoolean(boolean aValue)
Appends the specified value to the end of this list (optional operation).
|
void |
addBoolean(int aIndex,
boolean aValue)
Inserts the specified value at the specified position in this list (optional operation).
|
void |
clear() |
TLcdBooleanArrayList |
clone()
Creates and returns a copy of this object.
|
boolean |
contains(Object aO) |
boolean |
containsBoolean(boolean aValue)
Returns
true if this list contains the specified value. |
void |
ensureCapacity(int minCapacity)
Increases the capacity of this list to the specified capacity.
|
Boolean |
get(int index) |
boolean |
getBoolean(int aIndex)
Returns the value at the specified position in this list.
|
int |
indexOf(Object aO) |
int |
indexOfBoolean(boolean 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(Object aO) |
int |
lastIndexOfBoolean(boolean 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.
|
Boolean |
remove(int index) |
boolean |
removeBoolean(boolean aValue)
Removes the first occurrence of the specified value from this list, if it is present (optional operation).
|
boolean |
removeBoolean(int aIndex)
Removes the value at the specified position in this list (optional operation).
|
Boolean |
set(int index,
Boolean element) |
boolean |
setBoolean(int aIndex,
boolean aValue)
Replaces the value at the specified position in this list with the specified value (optional operation).
|
int |
size() |
boolean[] |
toBooleanArray()
Returns an array containing all of the values in this list in proper sequence (from first to last value).
|
boolean[] |
toBooleanArray(boolean[] 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.
|
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, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, addAll, addAll
add, containsAll, equals, hashCode, isEmpty, iterator, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
public TLcdBooleanArrayList()
TLcdBooleanArrayList
.public TLcdBooleanArrayList(int aInitialCapacity)
TLcdBooleanArrayList
with the specified initial capacity.aInitialCapacity
- the initial capacity of this list.public int size()
size
in interface Collection<Boolean>
size
in interface List<Boolean>
size
in class AbstractCollection<Boolean>
public Boolean get(int index)
public void add(int index, Boolean element)
public boolean addAll(Collection<? extends Boolean> c)
addAll
in interface Collection<Boolean>
addAll
in interface List<Boolean>
addAll
in class AbstractCollection<Boolean>
public boolean addAll(int index, Collection<? extends Boolean> c)
public boolean addAll(int aIndex, boolean[] aValues, int aOffset, int aLength)
ILcdBooleanList
aLength
boolean values from the given array to this list, starting from the given aOffset
addAll
in interface ILcdBooleanList
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 Boolean remove(int index)
public boolean getBoolean(int aIndex)
ILcdBooleanList
getBoolean
in interface ILcdBooleanList
aIndex
- index of the value to returnpublic boolean setBoolean(int aIndex, boolean aValue)
ILcdBooleanList
setBoolean
in interface ILcdBooleanList
aIndex
- index of the value to replaceaValue
- value to be stored at the specified positionpublic boolean addBoolean(boolean aValue)
ILcdBooleanList
addBoolean
in interface ILcdBooleanList
aValue
- value to be appended to this listtrue
public void addBoolean(int aIndex, boolean aValue)
ILcdBooleanList
addBoolean
in interface ILcdBooleanList
aIndex
- index at which the specified value is to be insertedaValue
- value to be insertedpublic boolean removeBoolean(boolean aValue)
ILcdBooleanList
true
if this list contained the specified value (or equivalently, if this list changed as a
result of the call).removeBoolean
in interface ILcdBooleanList
aValue
- value to be removed from this list, if presenttrue
if this list contained the specified valuepublic boolean removeBoolean(int aIndex)
ILcdBooleanList
removeBoolean
in interface ILcdBooleanList
aIndex
- the index of the value to be removedpublic boolean[] toBooleanArray()
ILcdBooleanList
toBooleanArray
in interface ILcdBooleanList
public boolean[] toBooleanArray(boolean[] anArray)
ILcdBooleanList
toBooleanArray
in interface ILcdBooleanList
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 Collection<Boolean>
clear
in interface List<Boolean>
clear
in class AbstractList<Boolean>
public TLcdBooleanArrayList clone()
ILcdBooleanList
clone
in interface ILcdBooleanList
clone
in interface ILcdCloneable
clone
in class Object
Object.clone()
public void ensureCapacity(int minCapacity)
minCapacity
- the new capacity for this list.public void trimToSize()
public int indexOf(Object aO)
public int indexOfBoolean(boolean aValue)
ILcdBooleanList
indexOfBoolean
in interface ILcdBooleanList
aValue
- value to search forpublic int lastIndexOf(Object aO)
lastIndexOf
in interface List<Boolean>
lastIndexOf
in class AbstractList<Boolean>
public int lastIndexOfBoolean(boolean aValue)
ILcdBooleanList
lastIndexOfBoolean
in interface ILcdBooleanList
aValue
- value to search forpublic boolean containsBoolean(boolean aValue)
ILcdBooleanList
true
if this list contains the specified value.containsBoolean
in interface ILcdBooleanList
aValue
- value whose presence in this list is to be testedtrue
if this list contains the specified valuepublic boolean contains(Object aO)
contains
in interface Collection<Boolean>
contains
in interface List<Boolean>
contains
in class AbstractCollection<Boolean>