|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
CEPath is an interface for represtenting paths through CEDigraph. A CEPath is expressly a subgraph of a specific CEDigraph. If two CEPaths contain the same nodes and edges in the same order, but are subgraphs of different CEDigraphs, they have different states but are the sameCEDigraphAS().
All CEPaths except the EMPTY path must have at least one node.
By default, this digraph uses equals() as the method to determine identity. Persistent versions may use hasSameIdentity() instead, for example.
Direct implementations of CEDigraph should have a single constructor that takes another CEPath in the constructor, and produce an Immutable CEPath.
Field Summary |
Fields inherited from interface net.walend.digraph.CEDigraph |
EMPTY |
Method Summary | |
java.lang.Object |
getEdgeAtIndex(int index)
|
java.util.List |
getEdgeList()
Returns an immutable list of the edges. |
int |
getIndexOfEdge(java.lang.Object edge)
|
int |
getLastIndexOfEdge(java.lang.Object edge)
|
CEPath |
getSubpath(int startNodeIndex,
int endNodeIndex)
Returns a new path, between startNodeIndex and endNodeIndex, inclusive. |
CEPath |
getSubpathFirst(java.lang.Object startNode,
java.lang.Object endNode)
Returns a new path, between the first occurence of startNode and the first occurence of endNode, inclusive. |
CEPath |
getSubpathFirstToLast(java.lang.Object startNode,
java.lang.Object endNode)
Returns a new path, between the first occurence of startNode and the last occurence of endNode, inclusive. |
CEPath |
getSubpathLast(java.lang.Object startNode,
java.lang.Object endNode)
Returns a new path, between the last occurence of startNode and the last occurence of endNode, inclusive. |
CEPath |
getSubpathLastToFirst(java.lang.Object startNode,
java.lang.Object endNode)
Returns a new path, between the last occurence of startNode and the first occurence of endNode, inclusive. |
CEDigraph |
getSupergraph()
Returns the supergraph. |
EdgeIterator |
pathEdgeIterator()
Implementations should explicitly state how they interpret nodeIterator()'s remove method. |
boolean |
sameCEPathAs(CEPath path)
Returns true if path is the same path as this, on the same digraph. |
Methods inherited from interface net.walend.digraph.CEDigraph |
containsCEDigraph, containsEdge, edgeIterator, getEdge, getEdges, getInboundEdges, getOutboundEdges, intersectWithCEDigraph, sameCEDigraphAs, unionCEDigraph |
Methods inherited from interface net.walend.digraph.Digraph |
containsEdge, containsNode, containsNodes, countInboundEdges, countOutboundEdges, edgeCount, edgeNodeIterator, getFromNodes, getNodes, getToNodes, isEdgeFree, isEmpty, nodeCount, nodeIterator |
Methods inherited from interface net.walend.collection.HasState |
getPrincipleInterface, sameStateAs |
Methods inherited from interface net.walend.digraph.path.Path |
getHead, getIndexOfNode, getLastIndexOfNode, getNodeAtIndex, getNodeList, getTail, pathEdgeCount, pathEdgeNodeIterator, pathNodeCount, pathNodeIterator, valid |
Method Detail |
public CEDigraph getSupergraph()
public int getIndexOfEdge(java.lang.Object edge)
public int getLastIndexOfEdge(java.lang.Object edge)
public java.lang.Object getEdgeAtIndex(int index)
public java.util.List getEdgeList()
public CEPath getSubpath(int startNodeIndex, int endNodeIndex) throws InvalidSpliceException
InvalidSpliceException
public CEPath getSubpathFirst(java.lang.Object startNode, java.lang.Object endNode) throws NodeMissingException, InvalidSpliceException
NodeMissingException
- if the nodes are not in the path.
InvalidSpliceException
- if the nodes are not in the right order.public CEPath getSubpathLast(java.lang.Object startNode, java.lang.Object endNode) throws NodeMissingException, InvalidSpliceException
NodeMissingException
- if the nodes are not in the path.
InvalidSpliceException
- if the nodes are not in the right order.public CEPath getSubpathFirstToLast(java.lang.Object startNode, java.lang.Object endNode) throws NodeMissingException, InvalidSpliceException
NodeMissingException
- if the nodes are not in the path.
InvalidSpliceException
- if the nodes are not in the right order.public CEPath getSubpathLastToFirst(java.lang.Object startNode, java.lang.Object endNode) throws NodeMissingException, InvalidSpliceException
NodeMissingException
- if the nodes are not in the path.
InvalidSpliceException
- if the nodes are not in the right order.public EdgeIterator pathEdgeIterator()
The Iterator should start at the beginning of the path and iterate to the end.
public boolean sameCEPathAs(CEPath path)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |