Class NotificationListEvent

java.lang.Object
java.util.EventObject
com.gargoylesoftware.base.collections.NotificationListEvent
All Implemented Interfaces:
Serializable

public class NotificationListEvent extends EventObject
An event that is fired when a NotificationList changes.
Version:
$Revision: 1.4 $
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • INSERT

      public static final int INSERT
      Action indicating that an item was inserted into the list.
      See Also:
    • REMOVE

      public static final int REMOVE
      Action indicating that an item was removed from the list.
      See Also:
    • CHANGE

      public static final int CHANGE
      Action indicating that an item in the list was change.
      See Also:
    • startIndex_

      private final int startIndex_
    • endIndex_

      private final int endIndex_
    • action_

      private final int action_
    • oldValues_

      private final List oldValues_
    • newValues_

      private final List newValues_
  • Constructor Details

    • NotificationListEvent

      public NotificationListEvent(NotificationList source, int action, int startIndex, int endIndex, List oldValues, List newValues)
      Create a new event.
      Parameters:
      source - The NotificationList
      action - The action that occured. This will be one of INSERT, REMOVE or CHANGE.
      startIndex - The index of the first item that is affected.
      endIndex - The index of the last item that is affected.
      oldValues - The original values.
      newValues - The new values.
  • Method Details

    • getStartIndex

      public int getStartIndex()
      Return the start index.
      Returns:
      The start index.
    • getEndIndex

      public int getEndIndex()
      Return the end index.
      Returns:
      The end index.
    • getAction

      public int getAction()
      Return the action which will be one of INSERT, REMOVE, CHANGE.
      Returns:
      The action.
    • getNewValues

      public List getNewValues()
      Return the new values
      Returns:
      The new values.
    • getOldValues

      public List getOldValues()
      Return the old values.
      Returns:
      The old values.
    • assertNotNull

      protected final void assertNotNull(String fieldName, Object object)
      Throw an exception if the specified object is null
      Parameters:
      fieldName - The name of the paremeter we are checking
      object - The value of the parameter we are checking