public class TLcdArrayList<T> extends Object implements ILcdList<T>, Cloneable, RandomAccess
Constructor and Description |
---|
TLcdArrayList()
Constructs an empty list with an initial capacity of ten.
|
TLcdArrayList(int aInitialCapacity)
Constructs an empty list with the specified initial capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int aIndex,
T aElement) |
boolean |
add(T aElement) |
boolean |
addAll(Collection<? extends T> aCollection) |
boolean |
addAll(int aIndex,
Collection<? extends T> aCollection) |
void |
addCollectionListener(ILcdCollectionListener<T> aCollectionListener)
Register the listener
aCollectionListener to be informed about changes in this
collection. |
void |
addListListener(ILcdListListener<T> aListListener)
Register the listener
aListListener to be informed about changes in this
list. |
void |
clear() |
Object |
clone()
Returns a shallow copy of this TLcdArrayList instance.
|
boolean |
contains(Object aObject) |
boolean |
containsAll(Collection<?> aCollection) |
boolean |
equals(Object aObject) |
T |
get(int aIndex) |
int |
hashCode() |
int |
indexOf(Object aObject) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
int |
lastIndexOf(Object aObject) |
ListIterator<T> |
listIterator() |
ListIterator<T> |
listIterator(int aIndex) |
T |
remove(int aIndex) |
boolean |
remove(Object aObject) |
boolean |
removeAll(Collection<?> aCollection) |
void |
removeCollectionListener(ILcdCollectionListener<T> aCollectionListener)
Unregister the listener
aCollectionListener so it will no longer be informed
about changes in this collection. |
void |
removeListListener(ILcdListListener<T> aListListener)
Unregister the listener
aListListener so it will no longer be informed
about changes in this collection. |
boolean |
retainAll(Collection<?> aCollection) |
T |
set(int aIndex,
T aElement) |
int |
size() |
List<T> |
subList(int aFromIndex,
int aToIndex) |
Object[] |
toArray() |
<U> U[] |
toArray(U[] aArray) |
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
replaceAll, sort, spliterator
parallelStream, removeIf, stream
public TLcdArrayList()
public TLcdArrayList(int aInitialCapacity)
aInitialCapacity
- the initial capacity of the listIllegalArgumentException
- if the specified initical capacity is negativepublic T set(int aIndex, T aElement)
ILcdList
Replacing the element should be performed in two distinct steps. First the removal of the element (including an event) and afterwards the adding of the new element (including an event).
public boolean add(T aElement)
public boolean remove(Object aObject)
public void clear()
ILcdCollection
The elements should be removed from the Collection
one by one, and an TLcdCollectionEvent
fired each time an element has been
removed.
clear
in interface ILcdCollection<T>
clear
in interface Collection<T>
clear
in interface List<T>
public boolean addAll(Collection<? extends T> aCollection)
ILcdCollection
The elements should be added to the Collection
one by one, and an TLcdCollectionEvent
fired each time an element has been
added.
addAll
in interface ILcdCollection<T>
addAll
in interface Collection<T>
addAll
in interface List<T>
public boolean addAll(int aIndex, Collection<? extends T> aCollection)
ILcdList
The elements should be added to the Collection
one by one, and an TLcdCollectionEvent
fired each time an element has been
added.
public boolean removeAll(Collection<?> aCollection)
ILcdCollection
The elements should be removed from the Collection
one by one, and an TLcdCollectionEvent
fired each time an element has been
removed.
removeAll
in interface ILcdCollection<T>
removeAll
in interface Collection<T>
removeAll
in interface List<T>
public boolean retainAll(Collection<?> aCollection)
ILcdCollection
The elements should be removed from the Collection
one by one, and an TLcdCollectionEvent
fired each time an element has been
removed.
retainAll
in interface ILcdCollection<T>
retainAll
in interface Collection<T>
retainAll
in interface List<T>
public int size()
public boolean isEmpty()
public boolean contains(Object aObject)
public int lastIndexOf(Object aObject)
lastIndexOf
in interface List<T>
public Object[] toArray()
public <U> U[] toArray(U[] aArray)
public ListIterator<T> listIterator()
listIterator
in interface List<T>
public ListIterator<T> listIterator(int aIndex)
listIterator
in interface List<T>
public boolean equals(Object aObject)
public int hashCode()
public boolean containsAll(Collection<?> aCollection)
containsAll
in interface Collection<T>
containsAll
in interface List<T>
public void addListListener(ILcdListListener<T> aListListener)
ILcdList
Register the listener aListListener
to be informed about changes in this
list.
addListListener
in interface ILcdList<T>
aListListener
- the listenerILcdList.removeListListener(ILcdListListener)
public void removeListListener(ILcdListListener<T> aListListener)
ILcdList
Unregister the listener aListListener
so it will no longer be informed
about changes in this collection.
This method should do nothing when aListListener
was not registered
previously.
removeListListener
in interface ILcdList<T>
aListListener
- the listenerILcdList.addListListener(ILcdListListener)
public void addCollectionListener(ILcdCollectionListener<T> aCollectionListener)
ILcdCollection
Register the listener aCollectionListener
to be informed about changes in this
collection.
addCollectionListener
in interface ILcdCollection<T>
aCollectionListener
- the listenerILcdCollection.removeCollectionListener(ILcdCollectionListener)
public void removeCollectionListener(ILcdCollectionListener<T> aCollectionListener)
ILcdCollection
Unregister the listener aCollectionListener
so it will no longer be informed
about changes in this collection.
This method should do nothing when addCollectionListener
was not registered
previously.
removeCollectionListener
in interface ILcdCollection<T>
aCollectionListener
- the listenerILcdCollection.addCollectionListener(ILcdCollectionListener)