org.geotools.graph
Interface EdgeList

All Known Implementing Classes:
BasicEdgeList, InOutEdgeList

public interface EdgeList

Represents the edge adjacency list for a node.


Method Summary
 void add(Edge edge)
          Adds an edge to the edge list.
 boolean contains(Edge edge)
          Determines if the edge list contains a certain edge.
 Edge getEdge(Node n1, Node n2)
          Returns an edge in the list ended by specfic nodes.
 java.util.List getEdges()
          Returns the edges contained in the edge list.
 java.util.List getOtherEdges(Edge edge)
          Returns the edges in the list minus a specific edge.
 java.util.List getOtherNodes(Node node)
          Returns a collection of nodes adjacent to edges in the list minus a specifc node.
 int getSize()
          Returns the size of the edge list.
 void remove(Edge edge)
          Removed an edge from the edge list.
 

Method Detail

getEdges

public java.util.List getEdges()
Returns the edges contained in the edge list.

Returns:
List

add

public void add(Edge edge)
Adds an edge to the edge list.

Parameters:
edge - the edge to be added.

remove

public void remove(Edge edge)
Removed an edge from the edge list.

Parameters:
edge - the edge to be removed.

getEdge

public Edge getEdge(Node n1,
                    Node n2)
Returns an edge in the list ended by specfic nodes.

Parameters:
n1 - Starting Edge Node
n2 - Ending Edge Node
Returns:
The Edge

getSize

public int getSize()
Returns the size of the edge list.

Returns:
The number of edges contained in the list.

getOtherEdges

public java.util.List getOtherEdges(Edge edge)
Returns the edges in the list minus a specific edge.

Parameters:
edge - The edge not to be returned.
Returns:
List

getOtherNodes

public java.util.List getOtherNodes(Node node)
Returns a collection of nodes adjacent to edges in the list minus a specifc node.

Parameters:
node - The node not to be returned.
Returns:
List

contains

public boolean contains(Edge edge)
Determines if the edge list contains a certain edge.

Returns:
True if the edge is contained, false otherwise.