N
- The type of Node this Event is identifyingpublic class NodeChangeEvent<N>
extends java.util.EventObject
Modifier and Type | Field and Description |
---|---|
static int |
NODE_ADDED
The constant ID used by an NodeChangeEvent to indicate that a
NodeChangeEvent was the result of a GraphNode being added to a Graph.
|
static int |
NODE_REMOVED
The constant ID used by an NodeChangeEvent to indicate that a
NodeChangeEvent was the result of a GraphNode being removed from a Graph.
|
Constructor and Description |
---|
NodeChangeEvent(Graph<N,?> graph,
N node,
int id)
Constructs a new NodeChangeEvent that occurred in the given Graph.
|
Modifier and Type | Method and Description |
---|---|
N |
getGraphNode()
Returns the Node which was added to or removed from the Graph.
|
int |
getID()
Returns an identifier indicating if the Node returned by getGraphNode()
was added to or removed from the Graph.
|
public static final int NODE_ADDED
public static final int NODE_REMOVED
public NodeChangeEvent(Graph<N,?> graph, N node, int id)
graph
- The Graph in which this NodeChangeEvent took placenode
- The Node which was added to or removed from the Graphid
- An integer identifying whether the given Node was added or
removed from the Graphpublic N getGraphNode()
public int getID()