org.graffiti.graph
Class AdjListEdge

java.lang.Object
  extended by org.graffiti.attributes.AbstractAttributable
      extended by org.graffiti.graph.AbstractGraphElement
          extended by org.graffiti.graph.AbstractEdge
              extended by org.graffiti.graph.AdjListEdge
All Implemented Interfaces:
Attributable, Edge, GraphElement

public class AdjListEdge
extends AbstractEdge
implements Edge, GraphElement

Implementation of the Edge interface for a Graph with adjacency list representation.

Version:
$Revision: 5779 $
See Also:
AdjListGraph, AdjListNode

Field Summary
 
Fields inherited from interface org.graffiti.graph.Edge
DIRECTED, UNDIRECTED
 
Method Summary
 void doSetTarget(Node target)
          Sets the target of the current Edge to target.
 Node getSource()
          Returns the source of the Edge.
 Node getTarget()
          Returns the target of the Edge.
 boolean isDirected()
          Returns true, if the Edge is directed, false otherwise.
 
Methods inherited from class org.graffiti.graph.AbstractEdge
reverse, setDirected, setSource, setTarget
 
Methods inherited from class org.graffiti.graph.AbstractGraphElement
getGraph, getListenerManager, remove, toString
 
Methods inherited from class org.graffiti.attributes.AbstractAttributable
addAttribute, addBoolean, addByte, addDouble, addFloat, addInteger, addLong, addShort, addString, changeBoolean, changeByte, changeDouble, changeFloat, changeInteger, changeLong, changeShort, changeString, containsAttribute, getAttribute, getAttributes, getBoolean, getByte, getDouble, getFloat, getInteger, getLong, getShort, getString, removeAttribute, setBoolean, setByte, setDouble, setFloat, setInteger, setLong, setShort, setString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.graffiti.graph.Edge
reverse, setDirected, setSource, setTarget
 
Methods inherited from interface org.graffiti.graph.GraphElement
getGraph, remove
 
Methods inherited from interface org.graffiti.attributes.Attributable
addAttribute, addBoolean, addByte, addDouble, addFloat, addInteger, addLong, addShort, addString, changeBoolean, changeByte, changeDouble, changeFloat, changeInteger, changeLong, changeShort, changeString, containsAttribute, getAttribute, getAttributes, getBoolean, getByte, getDouble, getFloat, getInteger, getListenerManager, getLong, getShort, getString, removeAttribute, setBoolean, setByte, setDouble, setFloat, setInteger, setLong, setShort, setString
 

Method Detail

isDirected

public boolean isDirected()
Returns true, if the Edge is directed, false otherwise.

Specified by:
isDirected in interface Edge
Returns:
true, if the Edge is directed, false otherwise.

getSource

public Node getSource()
Returns the source of the Edge.

Specified by:
getSource in interface Edge
Returns:
the source of the Edge.

getTarget

public Node getTarget()
Returns the target of the Edge.

Specified by:
getTarget in interface Edge
Returns:
the target of the Edge.

doSetTarget

public void doSetTarget(Node target)
                 throws GraphElementNotFoundException,
                        IllegalArgumentException
Sets the target of the current Edge to target. Target must be contained in the same Graph as the Edge. Informs the ListenerManager about the change.

Parameters:
target - the target to be set.
Throws:
GraphElementNotFoundException - if the target cannot be found in the Graph.
IllegalArgumentException - if target is not of type AdjListNode.


Generated at 2012-05-30 11:00:14 PM CEST