org.jgrapht.event
Class GraphEdgeChangeEvent<V,E>
- java.lang.Object
-
- java.util.EventObject
-
- org.jgrapht.event.GraphChangeEvent
-
- org.jgrapht.event.GraphEdgeChangeEvent<V,E>
-
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Implemented Interfaces:
- java.io.Serializable
public class GraphEdgeChangeEvent<V,E> extends GraphChangeEvent
An event which indicates that a graph edge has changed, or is about to change. The event can be used either as an indication after the edge has been added or removed, or before it is added. The type of the event can be tested using theGraphChangeEvent.getType()method.- Since:
- Aug 10, 2003
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intBEFORE_EDGE_ADDEDBefore edge added event.static intBEFORE_EDGE_REMOVEDBefore edge removed event.static intEDGE_ADDEDEdge added event.static intEDGE_REMOVEDEdge removed event.
-
Constructor Summary
Constructors Constructor and Description GraphEdgeChangeEvent(java.lang.Object eventSource, int type, E edge, V edgeSource, V edgeTarget)Constructor for GraphEdgeChangeEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description EgetEdge()Returns the edge that this event is related to.VgetEdgeSource()Returns the source vertex that this event is related to.VgetEdgeTarget()Returns the target vertex that this event is related to.-
Methods inherited from class org.jgrapht.event.GraphChangeEvent
getType
-
-
-
-
Field Detail
-
BEFORE_EDGE_ADDED
public static final int BEFORE_EDGE_ADDED
Before edge added event. This event is fired before an edge is added to a graph.- See Also:
- Constant Field Values
-
BEFORE_EDGE_REMOVED
public static final int BEFORE_EDGE_REMOVED
Before edge removed event. This event is fired before an edge is removed from a graph.- See Also:
- Constant Field Values
-
EDGE_ADDED
public static final int EDGE_ADDED
Edge added event. This event is fired after an edge is added to a graph.- See Also:
- Constant Field Values
-
EDGE_REMOVED
public static final int EDGE_REMOVED
Edge removed event. This event is fired after an edge is removed from a graph.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GraphEdgeChangeEvent
public GraphEdgeChangeEvent(java.lang.Object eventSource, int type, E edge, V edgeSource, V edgeTarget)Constructor for GraphEdgeChangeEvent.- Parameters:
eventSource- the source of this event.type- the event type of this event.edge- the edge that this event is related to.edgeSource- edge source vertexedgeTarget- edge target vertex
-
-
Method Detail
-
getEdge
public E getEdge()
Returns the edge that this event is related to.- Returns:
- event edge
-
getEdgeSource
public V getEdgeSource()
Returns the source vertex that this event is related to.- Returns:
- event source vertex
-
getEdgeTarget
public V getEdgeTarget()
Returns the target vertex that this event is related to.- Returns:
- event target vertex
-
-
DataMelt 3.0 © DataMelt by jWork.ORG