Class TLcdCollectionEvent<T>

java.lang.Object
java.util.EventObject
com.luciad.util.collections.TLcdCollectionEvent<T>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TLcdListEvent

public class TLcdCollectionEvent<T> extends EventObject
An event describing a change in an ILcdCollection.
Since:
9.1
See Also:
  • Constructor Details

    • TLcdCollectionEvent

      public TLcdCollectionEvent(ILcdCollection<T> aCollection, TLcdCollectionEvent.Type aType, T aElement, boolean aIsAdjusting)
      Create a new event describing a change in the collection aCollection.
      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

      public TLcdCollectionEvent.Type getType()
      Returns the type describing the nature of the change.
      Returns:
      the type describing the nature of the change.
    • getSource

      public ILcdCollection<T> getSource()
      Overrides:
      getSource in class EventObject
    • getElement

      public T 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.
    • 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.