|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--net.walend.digraph.path.AbstractListGEPath
|
+--net.walend.digraph.path.MutableListGEPath
This class implements the MutableGEPath interface using a list.
| Nested Class Summary |
| Nested classes inherited from class net.walend.digraph.path.AbstractListGEPath |
AbstractListGEPath.ListEdgeNodeIterator |
| Field Summary |
| Fields inherited from class net.walend.digraph.path.AbstractListGEPath |
|
| Fields inherited from interface net.walend.digraph.GEDigraph |
EMPTY |
| Constructor Summary | |
MutableListGEPath(GEDigraph digraph,
java.util.List nodeList)
Creates a new path on digraph that has only nodeList nodes in it, using nodeList. |
|
MutableListGEPath(GEDigraph digraph,
java.lang.Object node)
Creates a new path on digraph that has only node in it with DEFAULTCAPACITY of 7. |
|
MutableListGEPath(GEDigraph digraph,
java.lang.Object node,
int nodeCapacity)
Creates a new path on digraph that has only node in it, with a capacity nodeCapacity. |
|
MutableListGEPath(GEDigraph digraph,
java.lang.Object node,
java.util.List nodeList)
Creates a new path on digraph that has only node in it, using nodeList. |
|
MutableListGEPath(GEPath path)
Create a new path that is a copy of path. |
|
MutableListGEPath(GEPath path,
java.util.List nodeList)
Create a new path that is a copy of path, using nodeList as the nodes in the path. |
|
| Method Summary | |
void |
addToHead(java.lang.Object node)
Adds a node and edge to the beginning of the path. |
void |
addToTail(java.lang.Object node)
Adds an edge and node to the end of the path. |
void |
graftToHead(GEPath path)
Adds a path to the beginning of this path. |
void |
graftToTail(GEPath path)
Adds a path to the end of this path. |
GEPath |
pruneHead(int index)
Removes from the head to the edge at index. |
GEPath |
pruneHeadFromFirst(java.lang.Object node)
Removes from the head to the first occurance of node. |
GEPath |
pruneHeadFromLast(java.lang.Object node)
Removes from the head to the last occurance of node. |
GEPath |
pruneTail(int index)
Removes from the edge at index to the tail. |
GEPath |
pruneTailFromFirst(java.lang.Object node)
Removes from the first occurance of node to the tail. |
GEPath |
pruneTailFromLast(java.lang.Object node)
Removes from the last occurance of node to the tail. |
void |
removeHead()
Removes the head node from the path. |
void |
removeTail()
Removes the tail node from the path. |
GEPath |
splice(GEPath path,
int startNodeIndex,
int endNodeIndex)
Splices in path between the startNodeIndex and endNodeIndex. |
GEPath |
spliceFirst(GEPath path)
Splices in path between the first occurence of path's head and the first occurence of path's tail. |
GEPath |
spliceFirstToLast(GEPath path)
Splices in path between the first occurence of path's head and the last occurence of path's tail. |
GEPath |
spliceLast(GEPath path)
Splices in path between the last occurence of path's head and the last occurence of path's tail. |
GEPath |
spliceLastToFirst(GEPath 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.GEPath |
getSubpath, getSubpathFirst, getSubpathFirstToLast, getSubpathLast, getSubpathLastToFirst, getSupergraph, sameGEPathAs |
| Methods inherited from interface net.walend.digraph.GEDigraph |
containsGEDigraph, intersectWithGEDigraph, sameGEDigraphAs, unionGEDigraph |
| 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 MutableListGEPath(GEPath path)
throws InvalidPathException
InvalidPathException - if the path is not valid.
public MutableListGEPath(GEPath path,
java.util.List nodeList)
InvalidPathException - if the path is not valid.
public MutableListGEPath(GEDigraph digraph,
java.lang.Object node)
InvalidPathException - if the path is not valid (because the node isn't in the supergraph).
public MutableListGEPath(GEDigraph digraph,
java.lang.Object node,
int nodeCapacity)
InvalidPathException - if the path is not valid (because the node isn't in the supergraph).
public MutableListGEPath(GEDigraph digraph,
java.lang.Object node,
java.util.List nodeList)
InvalidPathException - if the path is not valid (because the node isn't in the supergraph).
public MutableListGEPath(GEDigraph digraph,
java.util.List nodeList)
InvalidPathException - if the path is not valid.| Method Detail |
public void addToTail(java.lang.Object node)
throws EdgeMissingException,
NodeMissingException
returns true if the operation is successful, false if the path is unchanged.
addToTail in interface MutableGEPathaddToTail in class AbstractListGEPathEdgeMissingException - 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)
throws EdgeMissingException,
NodeMissingException
returns true if the operation is successful, false if the path is unchanged.
addToHead in interface MutableGEPathaddToHead in class AbstractListGEPathEdgeMissingException - 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 removeHead()
throws LastNodeException
removeHead in interface MutableGEPathremoveHead in class AbstractListGEPathLastNodeException
public void removeTail()
throws LastNodeException
removeTail in interface MutableGEPathremoveTail in class AbstractListGEPathLastNodeException
public void graftToTail(GEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
graftToTail in interface MutableGEPathgraftToTail in class AbstractListGEPathEdgeMissingException - 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(GEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
graftToHead in interface MutableGEPathgraftToHead in class AbstractListGEPathEdgeMissingException - 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 GEPath pruneTail(int index)
pruneTail in interface MutableGEPathpruneTail in class AbstractListGEPathpublic GEPath pruneHead(int index)
pruneHead in interface MutableGEPathpruneHead in class AbstractListGEPath
public GEPath pruneTailFromFirst(java.lang.Object node)
throws NodeMissingException
pruneTailFromFirst in interface MutableGEPathpruneTailFromFirst in class AbstractListGEPathNodeMissingException - if the node is not in the digraph.
public GEPath pruneTailFromLast(java.lang.Object node)
throws NodeMissingException
pruneTailFromLast in interface MutableGEPathpruneTailFromLast in class AbstractListGEPathNodeMissingException - if the node is not in the digraph.
public GEPath pruneHeadFromFirst(java.lang.Object node)
throws NodeMissingException
pruneHeadFromFirst in interface MutableGEPathpruneHeadFromFirst in class AbstractListGEPathNodeMissingException - if the node is not in the digraph.
public GEPath pruneHeadFromLast(java.lang.Object node)
throws NodeMissingException
pruneHeadFromLast in interface MutableGEPathpruneHeadFromLast in class AbstractListGEPathNodeMissingException - if the node is not in the digraph.
public GEPath splice(GEPath path,
int startNodeIndex,
int endNodeIndex)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
splice in interface MutableGEPathsplice in class AbstractListGEPath
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 GEPath spliceFirst(GEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
spliceFirst in interface MutableGEPathspliceFirst in class AbstractListGEPath
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 GEPath spliceLast(GEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
spliceLast in interface MutableGEPathspliceLast in class AbstractListGEPath
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 GEPath spliceFirstToLast(GEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
spliceFirstToLast in interface MutableGEPathspliceFirstToLast in class AbstractListGEPath
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 GEPath spliceLastToFirst(GEPath path)
throws EdgeMissingException,
NodeMissingException,
InvalidSpliceException
spliceLastToFirst in interface MutableGEPathspliceLastToFirst in class AbstractListGEPath
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 | ||||||||||