org.dishevelled.observable.graph.event
Class VetoableGraphChangeEvent<N,E>

java.lang.Object
  extended by java.util.EventObject
      extended by org.dishevelled.observable.graph.event.VetoableGraphChangeEvent<N,E>
Type Parameters:
N - node value type
E - edge value type
All Implemented Interfaces:
Serializable

public class VetoableGraphChangeEvent<N,E>
extends EventObject

An event object representing a vetoable change about to be made to an observable graph.

Version:
$Revision$ $Date$
Author:
Michael Heuer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
VetoableGraphChangeEvent(ObservableGraph<N,E> source)
          Create a new vetoable graph change event with the specified observable graph as the event source.
VetoableGraphChangeEvent(ObservableGraph<N,E> source, Edge<N,E> edge)
          Create a new vetoable graph change event with the specified observable graph as the event source and the specified about to be removed edge.
VetoableGraphChangeEvent(ObservableGraph<N,E> source, N nodeValue)
          Create a new vetoable graph change event with the specified observable graph as the event source and the specified node value for an about to be created node.
VetoableGraphChangeEvent(ObservableGraph<N,E> source, Node<N,E> node)
          Create a new vetoable graph change event with the specified observable graph as the event source and the specified about to be removed node.
VetoableGraphChangeEvent(ObservableGraph<N,E> source, Node<N,E> sourceNode, Node<N,E> targetNode, E edgeValue)
          Create a new vetoable graph change event with the specified observable graph as the event source and specified source node, target node, and edge value for an about to be created edge.
 
Method Summary
 Edge<N,E> getEdge()
          Return the about to be removed edge, if any.
 E getEdgeValue()
          Return the edge value for the about to be created edge, if any.
 Node<N,E> getNode()
          Return the about to be removed node, if any.
 N getNodeValue()
          Return the node value for the about to be created node, if any.
 ObservableGraph<N,E> getObservableGraph()
          Return the source of this vetoable graph change event as an ObservableGraph.
 Node<N,E> getSourceNode()
          Return the source node for the about to be created edge, if any.
 Node<N,E> getTargetNode()
          Return the target node for the about to be created edge, if any.
 
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
 

Constructor Detail

VetoableGraphChangeEvent

public VetoableGraphChangeEvent(ObservableGraph<N,E> source)
Create a new vetoable graph change event with the specified observable graph as the event source.

Parameters:
source - source of the event, must not be null

VetoableGraphChangeEvent

public VetoableGraphChangeEvent(ObservableGraph<N,E> source,
                                Node<N,E> node)
Create a new vetoable graph change event with the specified observable graph as the event source and the specified about to be removed node.

Parameters:
source - source of the event, must not be null
node - about to be removed node

VetoableGraphChangeEvent

public VetoableGraphChangeEvent(ObservableGraph<N,E> source,
                                Edge<N,E> edge)
Create a new vetoable graph change event with the specified observable graph as the event source and the specified about to be removed edge.

Parameters:
source - source of the event, must not be null
edge - about to be removed edge

VetoableGraphChangeEvent

public VetoableGraphChangeEvent(ObservableGraph<N,E> source,
                                N nodeValue)
Create a new vetoable graph change event with the specified observable graph as the event source and the specified node value for an about to be created node.

Parameters:
source - source of the event, must not be null
nodeValue - node value for an about to be created node

VetoableGraphChangeEvent

public VetoableGraphChangeEvent(ObservableGraph<N,E> source,
                                Node<N,E> sourceNode,
                                Node<N,E> targetNode,
                                E edgeValue)
Create a new vetoable graph change event with the specified observable graph as the event source and specified source node, target node, and edge value for an about to be created edge.

Parameters:
source - source of the event, must not be null
sourceNode - source node for an about to be created edge
targetNode - target node for an about to be created edge
edgeValue - edge value for an about to be created edge
Method Detail

getObservableGraph

public final ObservableGraph<N,E> getObservableGraph()
Return the source of this vetoable graph change event as an ObservableGraph.

Returns:
the source of this vetoable graph change event as an ObservableGraph

getNode

public final Node<N,E> getNode()
Return the about to be removed node, if any.

Returns:
the about to be removed node, if any

getEdge

public final Edge<N,E> getEdge()
Return the about to be removed edge, if any.

Returns:
the about to be removed edge, if any

getNodeValue

public final N getNodeValue()
Return the node value for the about to be created node, if any.

Returns:
the node value for the about to be created node, if any

getSourceNode

public final Node<N,E> getSourceNode()
Return the source node for the about to be created edge, if any.

Returns:
the source node for the about to be created edge, if any

getTargetNode

public final Node<N,E> getTargetNode()
Return the target node for the about to be created edge, if any.

Returns:
the target node for the about to be created edge, if any

getEdgeValue

public final E getEdgeValue()
Return the edge value for the about to be created edge, if any.

Returns:
the edge value for the about to be created edge, if any


Copyright (c) 2008-2012 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).