org.graffiti.graph
Class FastEdge

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.FastEdge
All Implemented Interfaces:
Attributable, Edge, GraphElement, MultiLinkable<FastEdge,FastEdge.End>

public class FastEdge
extends AbstractEdge
implements MultiLinkable<FastEdge,FastEdge.End>

Version:
$Revision: 5767 $ $Date: 2009-06-24 00:16:53 +0200 (Mi, 24 Jun 2009) $
Author:
forster

Nested Class Summary
(package private) static class FastEdge.End
           
(package private) static class FastEdge.Incidency
           
 
Field Summary
(package private)  boolean directed
           
(package private)  MultiLinkNode<FastEdge> globalLink
           
(package private)  Map<FastEdge.End,MultiLinkNode<FastEdge>> incidencyLinks
           
(package private)  FastNode source
           
(package private)  FastNode target
           
 
Fields inherited from class org.graffiti.graph.AbstractGraphElement
graph
 
Fields inherited from class org.graffiti.attributes.AbstractAttributable
attributes
 
Fields inherited from interface org.graffiti.graph.Edge
DIRECTED, UNDIRECTED
 
Constructor Summary
FastEdge(Graph graph, FastNode source, FastNode target, boolean directed, CollectionAttribute coll)
           
 
Method Summary
protected  void doReverse()
          Swaps source and target of the edge.
protected  void doSetDirected(boolean directed)
          Determines if an Edge is directed (true) or not.
protected  void doSetSource(Node source)
          Sets the source of the current Edge to source.
protected  void doSetTarget(Node target)
          Sets the target of the current Edge to target.
 MultiLinkNode<FastEdge> getLinkNode(FastEdge.End incidency)
          Returns the link node corresponding to the list identified by the given link type.
 Node getSource()
          Returns the source of the current Edge.
 Node getTarget()
          Returns the target of the current Edge.
 boolean isDirected()
          Returns true, if the Edge is directed, false otherwise.
(package private)  void link()
           
 void setLinkNode(FastEdge.End e, MultiLinkNode<FastEdge> l)
          Sets the link node corresponding to the list identified by the given link type.
(package private)  void unlink()
           
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 

Field Detail

source

FastNode source

target

FastNode target

directed

boolean directed

globalLink

MultiLinkNode<FastEdge> globalLink

incidencyLinks

Map<FastEdge.End,MultiLinkNode<FastEdge>> incidencyLinks
Constructor Detail

FastEdge

public FastEdge(Graph graph,
                FastNode source,
                FastNode target,
                boolean directed,
                CollectionAttribute coll)
Method Detail

doReverse

protected void doReverse()
Description copied from class: AbstractEdge
Swaps source and target of the edge.

Specified by:
doReverse in class AbstractEdge

doSetDirected

protected void doSetDirected(boolean directed)
Description copied from class: AbstractEdge
Determines if an Edge is directed (true) or not.

Specified by:
doSetDirected in class AbstractEdge
Parameters:
directed - true, if the Edge is destined to be directed, false otherwise.

doSetSource

protected void doSetSource(Node source)
                    throws GraphElementNotFoundException
Description copied from class: AbstractEdge
Sets the source of the current Edge to source. source must be contained in the same Graph as the current Edge.

Specified by:
doSetSource in class AbstractEdge
Parameters:
source - the source to be set.
Throws:
GraphElementNotFoundException - if source cannot be found in the Graph.

doSetTarget

protected void doSetTarget(Node target)
                    throws GraphElementNotFoundException
Description copied from class: AbstractEdge
Sets the target of the current Edge to target. Target must be contained in the same Graph as the Edge.

Specified by:
doSetTarget in class AbstractEdge
Parameters:
target - the target to be set.
Throws:
GraphElementNotFoundException - if the target cannot be found in the Graph.

getLinkNode

public MultiLinkNode<FastEdge> getLinkNode(FastEdge.End incidency)
Description copied from interface: MultiLinkable
Returns the link node corresponding to the list identified by the given link type.

Specified by:
getLinkNode in interface MultiLinkable<FastEdge,FastEdge.End>
Parameters:
incidency - Identification of the respective list.
Returns:
The corresponding link node.

getSource

public Node getSource()
Description copied from interface: Edge
Returns the source of the current Edge.

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

getTarget

public Node getTarget()
Description copied from interface: Edge
Returns the target of the current Edge.

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

isDirected

public boolean isDirected()
Description copied from interface: Edge
Returns true, if the Edge is directed, false otherwise.

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

link

void link()

setLinkNode

public void setLinkNode(FastEdge.End e,
                        MultiLinkNode<FastEdge> l)
Description copied from interface: MultiLinkable
Sets the link node corresponding to the list identified by the given link type.

Specified by:
setLinkNode in interface MultiLinkable<FastEdge,FastEdge.End>
Parameters:
e - Identification of the respective list.
l - The corresponding link node.

unlink

void unlink()


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