Package groovy.util

# Class ObservableList.ElementEvent

java.lang.Object
java.util.EventObject
java.beans.PropertyChangeEvent
groovy.util.ObservableList.ElementEvent

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `ObservableList.ElementAddedEvent`, `ObservableList.ElementClearedEvent`, `ObservableList.ElementRemovedEvent`, `ObservableList.ElementUpdatedEvent`, `ObservableList.MultiElementAddedEvent`, `ObservableList.MultiElementRemovedEvent`

Enclosing class:
  ObservableList

public abstract static class ObservableList.ElementEvent extends PropertyChangeEvent
Base event type for observable list content changes.

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class java.util.EventObject

  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ElementEvent(Object source, Object oldValue, Object newValue, int index, ObservableList.ChangeType type)`
  Creates an element event.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ObservableList.ChangeType`
  `getChangeType()`
  Returns the specialized event type.
  `int`
  `getIndex()`
  Returns the affected index.
  `int`
  `getType()`
  Returns the specialized event type ordinal.
  `String`
  `getTypeAsString()`
  Returns the specialized event type name.

  ### Methods inherited from class java.beans.PropertyChangeEvent

  `getNewValue, getOldValue, getPropagationId, getPropertyName, setPropagationId, toString`

  ### Methods inherited from class java.util.EventObject

  `getSource`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ElementEvent

    public ElementEvent(Object source, Object oldValue, Object newValue, int index, ObservableList.ChangeType type)
    Creates an element event.
    Parameters:
      `source` - the event source
      `oldValue` - the previous value payload
      `newValue` - the new value payload
      `index` - the affected index
      `type` - the specialized change type

- ## Method Details

  - ### getIndex

    public int getIndex()
    Returns the affected index.
    Returns:
      the list index associated with the event

  - ### getType

    public int getType()
    Returns the specialized event type ordinal.
    Returns:
      the change type ordinal

  - ### getChangeType

    public ObservableList.ChangeType getChangeType()
    Returns the specialized event type.
    Returns:
      the change type

  - ### getTypeAsString

    public String getTypeAsString()
    Returns the specialized event type name.
    Returns:
      the change type name