org.graffiti.graph
Class AdjListEdge
java.lang.Object
org.graffiti.attributes.AbstractAttributable
org.graffiti.graph.AbstractGraphElement
org.graffiti.graph.AbstractEdge
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: 1001 $
- See Also:
AdjListGraph,
AdjListNode
|
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.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 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 |
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 2010-03-20 11:00:07 PM CET