Class TLcdArrayList<T>
- All Implemented Interfaces:
ILcdCollection<T>
,ILcdList<T>
,Cloneable
,Iterable<T>
,Collection<T>
,List<T>
,RandomAccess
,SequencedCollection<T>
- Since:
- 9.1
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty list with an initial capacity of ten.TLcdArrayList
(int aInitialCapacity) Constructs an empty list with the specified initial capacity. -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int aIndex, Collection<? extends T> aCollection) boolean
addAll
(Collection<? extends T> aCollection) void
addCollectionListener
(ILcdCollectionListener<T> aCollectionListener) Register the listeneraCollectionListener
to be informed about changes in this collection.void
addListListener
(ILcdListListener<T> aListListener) Register the listeneraListListener
to be informed about changes in this list.void
clear()
clone()
Returns a shallow copy of this TLcdArrayList instance.boolean
boolean
containsAll
(Collection<?> aCollection) boolean
get
(int aIndex) int
hashCode()
int
boolean
isEmpty()
iterator()
int
lastIndexOf
(Object aObject) listIterator
(int aIndex) remove
(int aIndex) boolean
boolean
removeAll
(Collection<?> aCollection) void
removeCollectionListener
(ILcdCollectionListener<T> aCollectionListener) Unregister the listeneraCollectionListener
so it will no longer be informed about changes in this collection.void
removeListListener
(ILcdListListener<T> aListListener) Unregister the listeneraListListener
so it will no longer be informed about changes in this collection.boolean
retainAll
(Collection<?> aCollection) int
size()
subList
(int aFromIndex, int aToIndex) Object[]
toArray()
<U> U[]
toArray
(U[] aArray) toString()
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Constructor Details
-
TLcdArrayList
public TLcdArrayList()Constructs an empty list with an initial capacity of ten. -
TLcdArrayList
public TLcdArrayList(int aInitialCapacity) Constructs an empty list with the specified initial capacity.- Parameters:
aInitialCapacity
- the initial capacity of the list- Throws:
IllegalArgumentException
- if the specified initical capacity is negative
-
-
Method Details
-
set
Description copied from interface: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).
-
add
-
add
-
remove
-
remove
-
clear
public void clear()Description copied from interface:ILcdCollection
The elements should be removed from the
Collection
one by one, and anTLcdCollectionEvent
fired each time an element has been removed.- Specified by:
clear
in interfaceCollection<T>
- Specified by:
clear
in interfaceILcdCollection<T>
- Specified by:
clear
in interfaceList<T>
-
addAll
Description copied from interface:ILcdCollection
The elements should be added to the
Collection
one by one, and anTLcdCollectionEvent
fired each time an element has been added.- Specified by:
addAll
in interfaceCollection<T>
- Specified by:
addAll
in interfaceILcdCollection<T>
- Specified by:
addAll
in interfaceList<T>
-
addAll
Description copied from interface:ILcdList
The elements should be added to the
Collection
one by one, and anTLcdCollectionEvent
fired each time an element has been added. -
removeAll
Description copied from interface:ILcdCollection
The elements should be removed from the
Collection
one by one, and anTLcdCollectionEvent
fired each time an element has been removed.- Specified by:
removeAll
in interfaceCollection<T>
- Specified by:
removeAll
in interfaceILcdCollection<T>
- Specified by:
removeAll
in interfaceList<T>
-
retainAll
Description copied from interface:ILcdCollection
The elements should be removed from the
Collection
one by one, and anTLcdCollectionEvent
fired each time an element has been removed.- Specified by:
retainAll
in interfaceCollection<T>
- Specified by:
retainAll
in interfaceILcdCollection<T>
- Specified by:
retainAll
in interfaceList<T>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<T>
-
toArray
-
toArray
public <U> U[] toArray(U[] aArray) -
get
-
iterator
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
subList
-
equals
-
hashCode
public int hashCode() -
containsAll
- Specified by:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceList<T>
-
toString
-
addListListener
Description copied from interface:ILcdList
Register the listener
aListListener
to be informed about changes in this list.- Specified by:
addListListener
in interfaceILcdList<T>
- Parameters:
aListListener
- the listener- See Also:
-
removeListListener
Description copied from interface: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.- Specified by:
removeListListener
in interfaceILcdList<T>
- Parameters:
aListListener
- the listener- See Also:
-
addCollectionListener
Description copied from interface:ILcdCollection
Register the listener
aCollectionListener
to be informed about changes in this collection.- Specified by:
addCollectionListener
in interfaceILcdCollection<T>
- Parameters:
aCollectionListener
- the listener- See Also:
-
removeCollectionListener
Description copied from interface: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.- Specified by:
removeCollectionListener
in interfaceILcdCollection<T>
- Parameters:
aCollectionListener
- the listener- See Also:
-
clone
Returns a shallow copy of this TLcdArrayList instance. (The elements themselves are not copied.). The returned list will have no listeners attached to it.
-