org.apache.commons.events.observable.standard
Class StandardPostModificationEvent
java.lang.Object
java.util.EventObject
org.apache.commons.events.observable.ModificationEvent
org.apache.commons.events.observable.standard.StandardModificationEvent
org.apache.commons.events.observable.standard.StandardPostModificationEvent
- All Implemented Interfaces:
- Serializable
public class StandardPostModificationEvent
- extends StandardModificationEvent
Event class that encapsulates all the event information for a
standard collection event.
The information stored in this event is all that is available as
parameters or return values.
In addition, the size
method is used on the collection.
All objects used are the real objects from the method calls, not clones.
- Since:
- Commons Events 1.0
- Version:
- $Revision: 155443 $ $Date: 2005-02-26 13:19:51 +0000 (Sat, 26 Feb 2005) $
- Author:
- Stephen Colebourne
- See Also:
- Serialized Form
Field Summary |
protected int |
postSize
The size after the event |
Method Summary |
int |
getPostSize()
Gets the size after the change. |
int |
getSizeChange()
Gets the size change, negative for remove/clear. |
boolean |
isSizeChanged()
Returns true if the size of the collection changed. |
Methods inherited from class org.apache.commons.events.observable.standard.StandardModificationEvent |
getChangeCollection, getChangeIndex, getChangeObject, getChangeRepeat, getPreSize, getPrevious, getView, getViewOffset, isType, isTypeAdd, isTypeBulk, isTypeChange, isTypeReduce, isView, toString |
postSize
protected final int postSize
- The size after the event
StandardPostModificationEvent
public StandardPostModificationEvent(ObservableCollection obsCollection,
ModificationHandler handler,
int type,
int preSize,
int index,
Object object,
int repeat,
Object previous,
ObservableCollection view,
int viewOffset)
- Constructor.
- Parameters:
obsCollection
- the event sourcehandler
- the handlertype
- the event typepreSize
- the size before the changeindex
- the index that changedobject
- the value that changedrepeat
- the number of repeatsprevious
- the previous value being removed/replacedview
- the view collection, null if event from main collectionviewOffset
- the offset within the main collection of the view, -1 if unknown
getPostSize
public int getPostSize()
- Gets the size after the change.
- Returns:
- the size after the change
getSizeChange
public int getSizeChange()
- Gets the size change, negative for remove/clear.
- Returns:
- the size before the change
isSizeChanged
public boolean isSizeChanged()
- Returns true if the size of the collection changed.
- Returns:
- true is the size changed
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.