Class NotificationListEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.gargoylesoftware.base.collections.NotificationListEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class NotificationListEvent extends java.util.EventObjectAn event that is fired when a NotificationList changes.- Version:
- $Revision: 1.4 $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private intaction_static intCHANGEAction indicating that an item in the list was change.private intendIndex_static intINSERTAction indicating that an item was inserted into the list.private java.util.ListnewValues_private java.util.ListoldValues_static intREMOVEAction indicating that an item was removed from the list.private static longserialVersionUIDprivate intstartIndex_
-
Constructor Summary
Constructors Constructor Description NotificationListEvent(NotificationList source, int action, int startIndex, int endIndex, java.util.List oldValues, java.util.List newValues)Create a new event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertNotNull(java.lang.String fieldName, java.lang.Object object)Throw an exception if the specified object is nullintgetAction()Return the action which will be one of INSERT, REMOVE, CHANGE.intgetEndIndex()Return the end index.java.util.ListgetNewValues()Return the new valuesjava.util.ListgetOldValues()Return the old values.intgetStartIndex()Return the start index.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
INSERT
public static final int INSERT
Action indicating that an item was inserted into the list.- See Also:
- Constant Field Values
-
REMOVE
public static final int REMOVE
Action indicating that an item was removed from the list.- See Also:
- Constant Field Values
-
CHANGE
public static final int CHANGE
Action indicating that an item in the list was change.- See Also:
- Constant Field Values
-
startIndex_
private final int startIndex_
-
endIndex_
private final int endIndex_
-
action_
private final int action_
-
oldValues_
private final java.util.List oldValues_
-
newValues_
private final java.util.List newValues_
-
-
Constructor Detail
-
NotificationListEvent
public NotificationListEvent(NotificationList source, int action, int startIndex, int endIndex, java.util.List oldValues, java.util.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 Detail
-
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 java.util.List getNewValues()
Return the new values- Returns:
- The new values.
-
getOldValues
public java.util.List getOldValues()
Return the old values.- Returns:
- The old values.
-
assertNotNull
protected final void assertNotNull(java.lang.String fieldName, java.lang.Object object)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
-
-