|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--net.walend.digraph.path.AbstractListUEPath
|
+--net.walend.digraph.path.MutableListUEPath
This class implements the MutableUEPath interface using two lists.
| Nested Class Summary |
| Nested classes inherited from class net.walend.digraph.path.AbstractListUEPath |
AbstractListUEPath.ListEdgeIterator |
| Field Summary |
| Fields inherited from class net.walend.digraph.path.AbstractListUEPath |
|
| Fields inherited from interface net.walend.digraph.UEDigraph |
EMPTY |
| Constructor Summary | |
MutableListUEPath(UEDigraph digraph,
java.util.List nodeList,
java.util.List edgeList)
Creates a new path on digraph that has only node in it, using nodeListn and edgeList. |
|
MutableListUEPath(UEDigraph digraph,
java.lang.Object node)
Creates a new path on digraph that has only node in it with DEFAULTCAPACITY of 7. |
|
MutableListUEPath(UEDigraph digraph,
java.lang.Object node,
int nodeCapacity)
Creates a new path on digraph that has only node in it, with a capacity nodeCapacity. |
|
MutableListUEPath(UEDigraph digraph,
java.lang.Object node,
java.util.List nodeList,
java.util.List edgeList)
Creates a new path on digraph that has only node in it, using nodeListn and edgeList. |
|
MutableListUEPath(UEPath path)
Create a new path that is a copy of path. |
|
MutableListUEPath(UEPath path,
java.util.List nodeList,
java.util.List edgeList)
Create a new path that is a copy of path, using nodeList and edgeList. |
|
| Method Summary | |
void |
addToHead(java.lang.Object node,
java.lang.Object edge)
Adds a node and edge to the beginning of the path. |
void |
addToTail(java.lang.Object edge,
java.lang.Object node)
Adds an edge and node to the end of the path. |
void |
graftToHead(UEPath path)
Adds a path to the beginning of this path. |
void |
graftToTail(UEPath path)
Adds a path to the end of this path. |
UEPath |
pruneHead(int index)
Removes from the head to the edge at index. |
UEPath |
pruneHeadFromFirst(java.lang.Object node)
Removes from the head to the first occurance of node. |
UEPath |
pruneHeadFromLast(java.lang.Object node)
Removes from the head to the last occurance of node. |
UEPath |
pruneTail(int index)
Removes from the edge at index to the tail. |
UEPath |
pruneTailFromFirst(java.lang.Object node)
Removes from the first occurance of node to the tail. |
UEPath |
pruneTailFromLast(java.lang.Object node)
Removes from the last occurance of node to the tail. |
java.lang.Object |
removeHead()
Removes the head node from the path. |
java.lang.Object |
removeTail()
Removes the tail node from the path. |
UEPath |
splice(UEPath path,
int startNodeIndex,
int endNodeIndex)
Splices in path between the startNodeIndex and endNodeIndex. |
UEPath |
spliceFirst(UEPath path)
Splices in path between the first occurence of path's head and the first occurence of path's tail. |
UEPath |
spliceFirstToLast(UEPath path)
Splices in path between the first occurence of path's head and the last occurence of path's tail. |
UEPath |
spliceLast(UEPath path)
Splices in path between the last occurence of path's head and the last occurence of path's tail. |
UEPath |
spliceLastToFirst(UEPath path)
Splices in path between the last occurence of path's head and the first occurence of path's tail. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.walend.digraph.path.UEPath |
getEdgeAtIndex, getEdgeList, getIndexOfEdge, getLastIndexOfEdge, getSubpath, getSubpathFirst, getSubpathFirstToLast, getSubpathLast, getSubpathLastToFirst, getSupergraph, pathEdgeIterator, sameUEPathAs |
| 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 |
| Constructor Detail |
public MutableListUEPath(UEPath path)
throws InvalidPathException
InvalidPathException - if the path is not valid.
public MutableListUEPath(UEPath path,
java.util.List nodeList,
java.util.List edgeList)
InvalidPathException - if the path is not valid.
public MutableListUEPath(UEDigraph digraph,
java.lang.Object node)
InvalidPathException - if the path is not valid (because the node isn't in the supergraph).
public MutableListUEPath(UEDigraph digraph,
java.lang.Object node,
int nodeCapacity)
InvalidPathException - if the path is not valid (because the node isn't in the supergraph).
public MutableListUEPath(UEDigraph digraph,
java.lang.Object node,
java.util.List nodeList,
java.util.List edgeList)
InvalidPathException - if the path is not valid (because the node isn't in the supergraph).
public MutableListUEPath(UEDigraph digraph,
java.util.List nodeList,
java.util.List edgeList)
InvalidPathException - if the path is not valid (because the node isn't in the supergraph).| Method Detail |
public void addToTail(java.lang.Object edge,
java.lang.Object node)
throws EdgeMissingException,
NodeMissingException
returns true if the operation is successful, false if the path is unchanged.
addToTail in interface MutableUEPathaddToTail in class AbstractListUEPathEdgeMissingException - if the edge is not in the digraph between the tail node and node.
NodeMissingException - if the node is not in the digraph.
public void addToHead(java.lang.Object node,
java.lang.Object edge)
throws EdgeMissingException,
NodeMissingException
returns true if the operation is successful, false if the path is unchanged.
addToHead in interface MutableUEPathaddToHead in class AbstractListUEPathEdgeMissingException - if the edge is not in the digraph between the tail node and node.
NodeMissingException - if the node is not in the digraph.
public java.lang.Object removeHead()
throws LastNodeException
returns the orphaned edge.
removeHead in interface MutableUEPathremoveHead in class AbstractListUEPathLastNodeException
public java.lang.Object removeTail()
throws LastNodeException
returns the orphaned edge.
removeTail in interface MutableUEPathremoveTail in class AbstractListUEPathLastNodeException
public void graftToTail(UEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
graftToTail in interface MutableUEPathgraftToTail in class AbstractListUEPathEdgeMissingException - if the any edge in path is missing from the digraph.
NodeMissingException - if any node in path not in the digraph.
InvalidSpliceException - if path's head node is not this' tail node.
public void graftToHead(UEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
graftToHead in interface MutableUEPathgraftToHead in class AbstractListUEPathEdgeMissingException - if the any edge in path is missing from the digraph.
NodeMissingException - if any node in path not in the digraph.
InvalidSpliceException - if path's tail node is not this' head node.public UEPath pruneTail(int index)
pruneTail in interface MutableUEPathpruneTail in class AbstractListUEPathpublic UEPath pruneHead(int index)
pruneHead in interface MutableUEPathpruneHead in class AbstractListUEPath
public UEPath pruneTailFromFirst(java.lang.Object node)
throws NodeMissingException
pruneTailFromFirst in interface MutableUEPathpruneTailFromFirst in class AbstractListUEPathNodeMissingException - if the node is not in the digraph.
public UEPath pruneTailFromLast(java.lang.Object node)
throws NodeMissingException
pruneTailFromLast in interface MutableUEPathpruneTailFromLast in class AbstractListUEPathNodeMissingException - if the node is not in the digraph.
public UEPath pruneHeadFromFirst(java.lang.Object node)
throws NodeMissingException
pruneHeadFromFirst in interface MutableUEPathpruneHeadFromFirst in class AbstractListUEPathNodeMissingException - if the node is not in the digraph.
public UEPath pruneHeadFromLast(java.lang.Object node)
throws NodeMissingException
pruneHeadFromLast in interface MutableUEPathpruneHeadFromLast in class AbstractListUEPathNodeMissingException - if the node is not in the digraph.
public UEPath splice(UEPath path,
int startNodeIndex,
int endNodeIndex)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
splice in interface MutableUEPathsplice in class AbstractListUEPath
EdgeMissingException - if the any edge in path is missing from the digraph.
NodeMissingException - if any node in path not in the digraph.
InvalidSpliceException - if path's head node is not the node in this at startNodeIndex, or if the path's tail node is not the node in this at endNodeIndex.
public UEPath spliceFirst(UEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
spliceFirst in interface MutableUEPathspliceFirst in class AbstractListUEPath
EdgeMissingException - if the any edge in path is missing from the digraph.
NodeMissingException - if any node in path not in the digraph.
InvalidSpliceException - if path's head node is not the node in this at startNodeIndex, or if the path's tail node is not the node in this at endNodeIndex.
public UEPath spliceLast(UEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
spliceLast in interface MutableUEPathspliceLast in class AbstractListUEPath
EdgeMissingException - if the any edge in path is missing from the digraph.
NodeMissingException - if any node in path not in the digraph.
InvalidSpliceException - if path's head node is not the node in this at startNodeIndex, or if the path's tail node is not the node in this at endNodeIndex.
public UEPath spliceFirstToLast(UEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
spliceFirstToLast in interface MutableUEPathspliceFirstToLast in class AbstractListUEPath
EdgeMissingException - if the any edge in path is missing from the digraph.
NodeMissingException - if any node in path not in the digraph.
InvalidSpliceException - if path's head node is not the node in this at startNodeIndex, or if the path's tail node is not the node in this at endNodeIndex.
public UEPath spliceLastToFirst(UEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
spliceLastToFirst in interface MutableUEPathspliceLastToFirst in class AbstractListUEPath
EdgeMissingException - if the any edge in path is missing from the digraph.
NodeMissingException - if any node in path not in the digraph.
InvalidSpliceException - if path's head node is not the node in this at startNodeIndex, or if the path's tail node is not the node in this at endNodeIndex.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||