Package com.luciad.util.collections
Class TLcdArrayList<T>
java.lang.Object
com.luciad.util.collections.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 TypeMethodDescriptionvoidThis method behaves the same asILcdList.add(int, Object), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call.booleanThis method behaves the same asILcdCollection.add(Object), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call.booleanaddAll(int aIndex, Collection<? extends T> aCollection, int aFireEventMode) This method behaves the same asILcdList.addAll(int, Collection), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call.booleanaddAll(Collection<? extends T> aCollection, int aFireEventMode) This method behaves the same asILcdCollection.addAll(Collection), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call.voidaddCollectionListener(ILcdCollectionListener<T> aCollectionListener) Register the listeneraCollectionListenerto be informed about changes in this collection.voidaddListListener(ILcdListListener<T> aListListener) Register the listeneraListListenerto be informed about changes in this list.voidclear(int aFireEventMode) This method behaves the same asILcdCollection.clear(), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call.clone()Returns a shallow copy of this TLcdArrayList instance.booleanbooleancontainsAll(Collection<?> aCollection) booleanvoidFires all the collected change events from modifications performed with theILcdFireEventMode.FIRE_LATERfire event mode.get(int aIndex) inthashCode()intbooleanisEmpty()iterator()intlastIndexOf(Object aObject) listIterator(int aIndex) remove(int aIndex, int aFireEventMode) This method behaves the same asILcdList.remove(int), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call.booleanThis method behaves the same asILcdCollection.remove(Object), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call.booleanremoveAll(Collection<?> aCollection, int aFireEventMode) This method behaves the same asILcdCollection.removeAll(Collection), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call.voidremoveCollectionListener(ILcdCollectionListener<T> aCollectionListener) Unregister the listeneraCollectionListenerso it will no longer be informed about changes in this collection.voidremoveListListener(ILcdListListener<T> aListListener) Unregister the listeneraListListenerso it will no longer be informed about changes in this collection.booleanretainAll(Collection<?> aCollection, int aFireEventMode) This method behaves the same asILcdCollection.retainAll(Collection), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call.This method behaves the same asILcdList.set(int, Object), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call.intsize()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, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface com.luciad.util.collections.ILcdList
add, add, addAll, addAll, clear, remove, remove, removeAll, retainAll, setMethods 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 initial capacity is negative
-
-
Method Details
-
set
Description copied from interface:ILcdListThis method behaves the same asILcdList.set(int, Object), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call. WhenILcdFireEventMode.FIRE_LATERis passed, any change events are temporarily stored and only fired onceILcdCollection.fireCollectedChanges()is called. This is useful for example when the list is protected by a read/write lock, in order to avoid potential deadlocks down the line. See theclass javadocfor an example code snippet.- Specified by:
setin interfaceILcdList<T>- Parameters:
aIndex- index of the element to replace.aElement- element to be stored at the specified position.aFireEventMode- theILcdFireEventModefor sending out the change event.- Returns:
- the element previously at the specified position
- See Also:
-
add
Description copied from interface:ILcdCollectionThis method behaves the same asILcdCollection.add(Object), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call. WhenILcdFireEventMode.FIRE_LATERis passed, any change events are temporarily stored and only fired onceILcdCollection.fireCollectedChanges()is called. This is useful for example when the collection is protected by a read/write lock, in order to avoid potential deadlocks down the line. See theclass javadocfor an example code snippet.- Specified by:
addin interfaceILcdCollection<T>- Parameters:
aElement- element whose presence in this collection is to be ensured.aFireEventMode- theILcdFireEventModefor sending out the change event.- Returns:
- true if this collection changed as a result of the call
- See Also:
-
add
Description copied from interface:ILcdListThis method behaves the same asILcdList.add(int, Object), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call. WhenILcdFireEventMode.FIRE_LATERis passed, any change events are temporarily stored and only fired onceILcdCollection.fireCollectedChanges()is called. This is useful for example when the list is protected by a read/write lock, in order to avoid potential deadlocks down the line. See theclass javadocfor an example code snippet.- Specified by:
addin interfaceILcdList<T>- Parameters:
aIndex- index at which the specified element is to be inserted.aElement- element to be inserted.aFireEventMode- theILcdFireEventModefor sending out the change event.- See Also:
-
remove
Description copied from interface:ILcdListThis method behaves the same asILcdList.remove(int), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call. WhenILcdFireEventMode.FIRE_LATERis passed, any change events are temporarily stored and only fired onceILcdCollection.fireCollectedChanges()is called. This is useful for example when the list is protected by a read/write lock, in order to avoid potential deadlocks down the line. See theclass javadocfor an example code snippet.- Specified by:
removein interfaceILcdList<T>- Parameters:
aIndex- the index of the element to be removed.aFireEventMode- theILcdFireEventModefor sending out the change event.- Returns:
- the element previously at the specified position
- See Also:
-
remove
Description copied from interface:ILcdCollectionThis method behaves the same asILcdCollection.remove(Object), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call. WhenILcdFireEventMode.FIRE_LATERis passed, any change events are temporarily stored and only fired onceILcdCollection.fireCollectedChanges()is called. This is useful for example when the collection is protected by a read/write lock, in order to avoid potential deadlocks down the line. See theclass javadocfor an example code snippet.- Specified by:
removein interfaceILcdCollection<T>- Parameters:
aObject- element to be removed from this collection, if present.aFireEventMode- theILcdFireEventModefor sending out the change event.- Returns:
- true if an element was removed as a result of this call
- See Also:
-
clear
public void clear(int aFireEventMode) Description copied from interface:ILcdCollectionThis method behaves the same asILcdCollection.clear(), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call. WhenILcdFireEventMode.FIRE_LATERis passed, any change events are temporarily stored and only fired onceILcdCollection.fireCollectedChanges()is called. This is useful for example when the collection is protected by a read/write lock, in order to avoid potential deadlocks down the line. See theclass javadocfor an example code snippet.- Specified by:
clearin interfaceILcdCollection<T>- Parameters:
aFireEventMode- theILcdFireEventModefor sending out the change event.- See Also:
-
addAll
Description copied from interface:ILcdCollectionThis method behaves the same asILcdCollection.addAll(Collection), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call. WhenILcdFireEventMode.FIRE_LATERis passed, any change events are temporarily stored and only fired onceILcdCollection.fireCollectedChanges()is called. This is useful for example when the collection is protected by a read/write lock, in order to avoid potential deadlocks down the line. See theclass javadocfor an example code snippet.- Specified by:
addAllin interfaceILcdCollection<T>- Parameters:
aCollection- collection containing elements to be added to this collection.aFireEventMode- theILcdFireEventModefor sending out the change event.- Returns:
- true if this collection changed as a result of the call
- See Also:
-
addAll
Description copied from interface:ILcdListThis method behaves the same asILcdList.addAll(int, Collection), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call. WhenILcdFireEventMode.FIRE_LATERis passed, any change events are temporarily stored and only fired onceILcdCollection.fireCollectedChanges()is called. This is useful for example when the list is protected by a read/write lock, in order to avoid potential deadlocks down the line. See theclass javadocfor an example code snippet.- Specified by:
addAllin interfaceILcdList<T>- Parameters:
aIndex- index at which to insert the first element from the specified collection.aCollection- collection containing elements to be added to this list.aFireEventMode- theILcdFireEventModefor sending out the change event.- Returns:
- true if this list changed as a result of the call
- See Also:
-
removeAll
Description copied from interface:ILcdCollectionThis method behaves the same asILcdCollection.removeAll(Collection), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call. WhenILcdFireEventMode.FIRE_LATERis passed, any change events are temporarily stored and only fired onceILcdCollection.fireCollectedChanges()is called. This is useful for example when the collection is protected by a read/write lock, in order to avoid potential deadlocks down the line. See theclass javadocfor an example code snippet.- Specified by:
removeAllin interfaceILcdCollection<T>- Parameters:
aCollection- collection containing elements to be removed from this collection.aFireEventMode- theILcdFireEventModefor sending out the change event.- Returns:
- true if this collection changed as a result of the call
- See Also:
-
retainAll
Description copied from interface:ILcdCollectionThis method behaves the same asILcdCollection.retainAll(Collection), but additionally accepts anILcdFireEventModeparameter that allows to postpone firing change events resulting from this method call. WhenILcdFireEventMode.FIRE_LATERis passed, any change events are temporarily stored and only fired onceILcdCollection.fireCollectedChanges()is called. This is useful for example when the collection is protected by a read/write lock, in order to avoid potential deadlocks down the line. See theclass javadocfor an example code snippet.- Specified by:
retainAllin interfaceILcdCollection<T>- Parameters:
aCollection- collection containing elements to be retained in this collection.aFireEventMode- theILcdFireEventModefor sending out the change event.- Returns:
- true if this collection changed as a result of the call
- See Also:
-
fireCollectedChanges
public void fireCollectedChanges()Description copied from interface:ILcdCollectionFires all the collected change events from modifications performed with theILcdFireEventMode.FIRE_LATERfire event mode.- Specified by:
fireCollectedChangesin interfaceILcdCollection<T>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<T>
-
toArray
-
toArray
public <U> U[] toArray(U[] aArray) -
get
-
iterator
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
subList
-
equals
-
hashCode
public int hashCode() -
containsAll
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
toString
-
addListListener
Description copied from interface:ILcdListRegister the listener
aListListenerto be informed about changes in this list.- Specified by:
addListListenerin interfaceILcdList<T>- Parameters:
aListListener- the listener- See Also:
-
removeListListener
Description copied from interface:ILcdListUnregister the listener
aListListenerso it will no longer be informed about changes in this collection.This method should do nothing when
aListListenerwas not registered previously.- Specified by:
removeListListenerin interfaceILcdList<T>- Parameters:
aListListener- the listener- See Also:
-
addCollectionListener
Description copied from interface:ILcdCollectionRegister the listener
aCollectionListenerto be informed about changes in this collection.- Specified by:
addCollectionListenerin interfaceILcdCollection<T>- Parameters:
aCollectionListener- the listener- See Also:
-
removeCollectionListener
Description copied from interface:ILcdCollectionUnregister the listener
aCollectionListenerso it will no longer be informed about changes in this collection.This method should do nothing when
aCollectionListenerwas not registered previously.- Specified by:
removeCollectionListenerin 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.
-