Package com.luciad.util.collections
Class TLcdCollectionEvent<T>
java.lang.Object
java.util.EventObject
com.luciad.util.collections.TLcdCollectionEvent<T>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TLcdListEvent
An event describing a change in an
ILcdCollection
.- Since:
- 9.1
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration of the types ofTLcdCollectionEvent
s -
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionTLcdCollectionEvent
(ILcdCollection<T> aCollection, TLcdCollectionEvent.Type aType, T aElement, boolean aIsAdjusting) Create a new event describing a change in the collectionaCollection
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the element which caused the change in the collection:getType()
Returns the type describing the nature of the change.boolean
Returnstrue
if more changes will be made to the collection immediately after this one,false
otherwise.Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
TLcdCollectionEvent
public TLcdCollectionEvent(ILcdCollection<T> aCollection, TLcdCollectionEvent.Type aType, T aElement, boolean aIsAdjusting) Create a new event describing a change in the collectionaCollection
.- Parameters:
aCollection
- The collection in which the change occurred.aType
- The type describing the nature of the change.aElement
- The element which caused the change.aIsAdjusting
-true
if more changes will be made to the collection after this change,false
otherwise- See Also:
-
-
Method Details
-
getType
Returns the type describing the nature of the change.- Returns:
- the type describing the nature of the change.
-
getSource
- Overrides:
getSource
in classEventObject
-
getElement
Returns the element which caused the change in the collection:
- Type ==
ELEMENT_ADDED
: the returned object is the element that was added to the collection. - Type ==
ELEMENT_REMOVED
: the returned object is the element that was removed from the collection.
- Returns:
- the element which caused the change in the collection.
- Type ==
-
isAdjusting
public boolean isAdjusting()Returns
true
if more changes will be made to the collection immediately after this one,false
otherwise.When for example using
ILcdCollection.addAll(java.util.Collection)
events will be fired for every element added to the collection. In this case this property should be true for all events except the one of the last inserted element.- Returns:
true
if more changes will be made to the collection immediately after this one,false
otherwise.
-