org.graffiti.graph
Class AdjListNode

java.lang.Object
  extended by org.graffiti.attributes.AbstractAttributable
      extended by org.graffiti.graph.AbstractGraphElement
          extended by org.graffiti.graph.AbstractNode
              extended by org.graffiti.graph.AdjListNode
All Implemented Interfaces:
Attributable, GraphElement, Node

public class AdjListNode
extends AbstractNode
implements Node, GraphElement

Implements a graph node with adjacency list representation.

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

Method Summary
 Iterator<Edge> getDirectedInEdgesIterator()
          Returns an iterator containing the directed ingoing edges of the Node.
 Iterator<Edge> getDirectedOutEdgesIterator()
          Returns an iterator containing the outgoing directed edges of the Node.
 Iterator<Edge> getEdgesIterator()
          Returns an iterator containing all the ingoing and outgoing directed and undirected edges of the current Node.
 int getInDegree()
          Returns the in-degree of the current Node.
 int getOutDegree()
          Returns the out-degree of the current Node.
 Iterator<Edge> getUndirectedEdgesIterator()
          Returns an iterator containing the undirected ingoing and outgoing edges of the Node.
 
Methods inherited from class org.graffiti.graph.AbstractNode
getAllInEdges, getAllInNeighbors, getAllOutEdges, getAllOutNeighbors, getDirectedInEdges, getDirectedOutEdges, getEdges, getInNeighbors, getInNeighborsIterator, getNeighbors, getNeighborsIterator, getOutNeighbors, getOutNeighborsIterator, getUndirectedEdges, getUndirectedNeighbors
 
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.Node
getAllInEdges, getAllInNeighbors, getAllOutEdges, getAllOutNeighbors, getDirectedInEdges, getDirectedOutEdges, getEdges, getInNeighbors, getInNeighborsIterator, getNeighbors, getNeighborsIterator, getOutNeighbors, getOutNeighborsIterator, getUndirectedEdges, getUndirectedNeighbors
 
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

getDirectedInEdgesIterator

public Iterator<Edge> getDirectedInEdgesIterator()
Returns an iterator containing the directed ingoing edges of the Node.

Specified by:
getDirectedInEdgesIterator in interface Node
Returns:
an iterator containing the directed ingoing edges of the Node.

getDirectedOutEdgesIterator

public Iterator<Edge> getDirectedOutEdgesIterator()
Returns an iterator containing the outgoing directed edges of the Node.

Specified by:
getDirectedOutEdgesIterator in interface Node
Returns:
an iterator containing the outgoing directed edges of the Node.

getEdgesIterator

public Iterator<Edge> getEdgesIterator()
Returns an iterator containing all the ingoing and outgoing directed and undirected edges of the current Node. Ingoing and outgoing edges will not be separated and there will be no ordering on the collection.

Specified by:
getEdgesIterator in interface Node
Returns:
an iterator containing all ingoing and outgoing directed and undirected edges of the current Node.

getInDegree

public int getInDegree()
Returns the in-degree of the current Node. The in-degree is defined as the number of ingoing, directed edges plus the number of undirected edges.

Specified by:
getInDegree in interface Node
Overrides:
getInDegree in class AbstractNode
Returns:
the in-degree of the current Node.

getOutDegree

public int getOutDegree()
Returns the out-degree of the current Node. The out-degree is defined as the number of outgoing, directed edges plus the number of undirected edges.

Specified by:
getOutDegree in interface Node
Overrides:
getOutDegree in class AbstractNode
Returns:
the out-degree of the current Node.

getUndirectedEdgesIterator

public Iterator<Edge> getUndirectedEdgesIterator()
Returns an iterator containing the undirected ingoing and outgoing edges of the Node.

Specified by:
getUndirectedEdgesIterator in interface Node
Returns:
a iterator containing the undirected ingoing and outgoing edges of the Node.


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