Class NotificationListEvent
java.lang.Object
java.util.EventObject
com.gargoylesoftware.base.collections.NotificationListEvent
- All Implemented Interfaces:
Serializable
An event that is fired when a NotificationList changes.
- Version:
- $Revision: 1.4 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
static final int
Action indicating that an item in the list was change.private final int
static final int
Action indicating that an item was inserted into the list.private final List
private final List
static final int
Action indicating that an item was removed from the list.private static final long
private final int
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionNotificationListEvent
(NotificationList source, int action, int startIndex, int endIndex, List oldValues, List newValues) Create a new event. -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
assertNotNull
(String fieldName, Object object) Throw an exception if the specified object is nullint
Return the action which will be one of INSERT, REMOVE, CHANGE.int
Return the end index.Return the new valuesReturn the old values.int
Return the start index.Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
INSERT
public static final int INSERTAction indicating that an item was inserted into the list.- See Also:
-
REMOVE
public static final int REMOVEAction indicating that an item was removed from the list.- See Also:
-
CHANGE
public static final int CHANGEAction 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_
-
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 NotificationListaction
- 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
Return the new values- Returns:
- The new values.
-
getOldValues
Return the old values.- Returns:
- The old values.
-
assertNotNull
Throw an exception if the specified object is null- Parameters:
fieldName
- The name of the paremeter we are checkingobject
- The value of the parameter we are checking
-