com.virtuosotechnologies.lib.container
Class ObjectDequeEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.virtuosotechnologies.lib.container.ObjectDequeEvent
All Implemented Interfaces:
Serializable

public class ObjectDequeEvent
extends EventObject

An event sent when an Object is added or removed in an ObjectDeque.

See Also:
Serialized Form

Nested Class Summary
static class ObjectDequeEvent.Type
          The type of event (added or removed)
 
Field Summary
static ObjectDequeEvent.Type INSERTED
          A Type indicating the object was inserted
static ObjectDequeEvent.Type POPPED_BACK
          A Type indicating the object was popped from the back
static ObjectDequeEvent.Type POPPED_FRONT
          A Type indicating the object was popped from the front
static ObjectDequeEvent.Type PUSHED_BACK
          A Type indicating the object was pushed to the back
static ObjectDequeEvent.Type PUSHED_FRONT
          A Type indicating the object was pushed to the front
static ObjectDequeEvent.Type REMOVED
          A Type indicating the object was removed
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ObjectDequeEvent(ObjectDeque source, ObjectDequeEvent.Type type, Object object, int index)
          Constructor
 
Method Summary
 ObjectDequeEvent.Type getEventType()
          Get the type of event.
 int getIndex()
          Get the index of the Object affected
 Object getObject()
          Get the Object added or removed
 ObjectDeque getObjectDeque()
          Get the source.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PUSHED_FRONT

public static final ObjectDequeEvent.Type PUSHED_FRONT
A Type indicating the object was pushed to the front


PUSHED_BACK

public static final ObjectDequeEvent.Type PUSHED_BACK
A Type indicating the object was pushed to the back


INSERTED

public static final ObjectDequeEvent.Type INSERTED
A Type indicating the object was inserted


POPPED_FRONT

public static final ObjectDequeEvent.Type POPPED_FRONT
A Type indicating the object was popped from the front


POPPED_BACK

public static final ObjectDequeEvent.Type POPPED_BACK
A Type indicating the object was popped from the back


REMOVED

public static final ObjectDequeEvent.Type REMOVED
A Type indicating the object was removed

Constructor Detail

ObjectDequeEvent

public ObjectDequeEvent(ObjectDeque source,
                        ObjectDequeEvent.Type type,
                        Object object,
                        int index)
Constructor

Parameters:
source - source ObjectDeque
type - the type of event
object - the object in question
index - the index of the object
Method Detail

getObjectDeque

public ObjectDeque getObjectDeque()
Get the source.

Returns:
source

getEventType

public ObjectDequeEvent.Type getEventType()
Get the type of event.

Returns:
type

getObject

public Object getObject()
Get the Object added or removed

Returns:
the object

getIndex

public int getIndex()
Get the index of the Object affected

Returns:
the index