beowulf.event
Class GraphEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bybeowulf.event.GraphEvent
All Implemented Interfaces:
Serializable

public class GraphEvent
extends EventObject

This class is an immutable encapsulation of all the data necessary to define events that can occur to change an instance of a graph.

Version:
1.0, 6/15/2003
Author:
Andy Scukanec (ags at cs dot cornell dot edu)
See Also:
Serialized Form

Field Summary
static int EDGE_ADDED
          Identifies that an edge was added.
static int EDGE_REMOVED
          Identifies that an edge was removed.
protected  int eventType
          Holds the even type.
static int NODE_ADDED
          Identifies that a node was added.
static int NODE_REMOVED
          Identifies that a node was removed.
protected  Object value
          Holds the associated value.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GraphEvent(Object g, int eventType, Object value)
          The basic constructor for a GraphEvent.
 
Method Summary
 int getEventType()
          Returns the type of graph event.
 Object getValue()
          Returns the node value/edge affected by this event.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NODE_ADDED

public static final int NODE_ADDED
Identifies that a node was added.

See Also:
Constant Field Values

NODE_REMOVED

public static final int NODE_REMOVED
Identifies that a node was removed.

See Also:
Constant Field Values

EDGE_ADDED

public static final int EDGE_ADDED
Identifies that an edge was added.

See Also:
Constant Field Values

EDGE_REMOVED

public static final int EDGE_REMOVED
Identifies that an edge was removed.

See Also:
Constant Field Values

eventType

protected int eventType
Holds the even type.


value

protected Object value
Holds the associated value.

Constructor Detail

GraphEvent

public GraphEvent(Object g,
                  int eventType,
                  Object value)
The basic constructor for a GraphEvent. Must supply a graph, an event type, and a value (affected node value/edge).

Parameters:
g - The graph which was affected by this event.
eventType - The type of event which occurred.
value - The node value/edge which was affected by this event.
Method Detail

getEventType

public int getEventType()
Returns the type of graph event.

Returns:
The type of graph event.

getValue

public Object getValue()
Returns the node value/edge affected by this event.

Returns:
The node value/edge affected by this event.

toString

public String toString()