|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
UEPath is an interface for represtenting paths through UEDigraph. A UEPath is expressly a subgraph of a specific UEDigraph. If two UEPaths contain the same nodes and edges in the same order, but are subgraphs of different UEDigraphs, they have different states but are the sameUEDigraphAS().
All UEPaths 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 UEDigraph should have a single constructor that takes another UEPath in the constructor, and produce an Immutable UEPath.
Field Summary |
Fields inherited from interface net.walend.digraph.UEDigraph |
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)
|
UEPath |
getSubpath(int startNodeIndex,
int endNodeIndex)
Returns a new path, between startNodeIndex and endNodeIndex, inclusive. |
UEPath |
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. |
UEPath |
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. |
UEPath |
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. |
UEPath |
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. |
UEDigraph |
getSupergraph()
Returns the supergraph. |
EdgeIterator |
pathEdgeIterator()
Implementations should explicitly state how they interpret nodeIterator()'s remove method. |
boolean |
sameUEPathAs(UEPath path)
Returns true if path is the same path as this, on the same digraph. |
Methods inherited from interface net.walend.digraph.UEDigraph |
containsEdge, containsEdge, containsEdges, containsUEDigraph, edgeIterator, getEdge, getEdges, getFromNode, getInboundEdges, getOutboundEdges, getToNode, intersectWithUEDigraph, sameUEDigraphAs, unionUEDigraph |
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 UEDigraph 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 UEPath getSubpath(int startNodeIndex, int endNodeIndex) throws InvalidSpliceException
InvalidSpliceException
public UEPath 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 UEPath 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 UEPath 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 UEPath 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 sameUEPathAs(UEPath path)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |