|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.graph.impl.AbstractGraph<N,E>
com.kuka.graph.impl.AbstractBaseGraph<N,E>
com.kuka.graph.impl.Subgraph<N,E>
com.kuka.graph.impl.BasePath<N,E>
N - the node type.E - the edge type.public class BasePath<N,E extends Edge<N>>
Class realizing a path in a directed graph.
| Constructor Summary | |
|---|---|
BasePath(Graph<N,E> graph)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
addEdge(E edge)
Adds the specified edge to this graph if it is not already present (optional operation). |
boolean |
addNode(N node)
Adds the specified node to this graph if it is not already present (optional operation). |
Path<N,E> |
concat(Path<N,E> other)
Concatenates the specified path to the end of this path. |
N |
firstNode()
Returns the first node of this path. |
Iterator<N> |
iterator()
|
N |
lastNode()
Returns the last node of this path. |
boolean |
removeFirstNode()
Removes the first node (and edge to second node) from this path (optional operation). |
boolean |
removeLastNode()
Removes the last node (and edge to last node) from this path (optional operation). |
| Methods inherited from class com.kuka.graph.impl.Subgraph |
|---|
createEdge, createNode, graph |
| Methods inherited from class com.kuka.graph.impl.AbstractBaseGraph |
|---|
clone, containsEdge, containsNode, edges, getEdge, incomingEdges, neighbors, nodes, outgoingEdges, removeEdge, removeNode |
| Methods inherited from class com.kuka.graph.impl.AbstractGraph |
|---|
addAllEdges, addAllNodes, clear, containsAllEdges, containsAllNodes, containsEdge, edges, edgeSize, isEmpty, nodes, nodeSize, removeAllEdges, removeAllNodes, removeEdge, retainAllEdges, retainAllNodes, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.kuka.graph.Graph |
|---|
addAllEdges, addAllNodes, clear, containsAllEdges, containsAllNodes, containsEdge, containsEdge, containsNode, createEdge, createNode, edges, edges, edgeSize, getEdge, incomingEdges, isEmpty, neighbors, nodes, nodes, nodeSize, outgoingEdges, removeAllEdges, removeAllNodes, removeEdge, removeEdge, removeNode, retainAllEdges, retainAllNodes |
| Constructor Detail |
|---|
public BasePath(Graph<N,E> graph)
graph - the graph in which this path lies.| Method Detail |
|---|
public Iterator<N> iterator()
iterator in interface Iterable<N>iterator in class AbstractGraph<N,E extends Edge<N>>public N firstNode()
Path
firstNode in interface Path<N,E extends Edge<N>>public N lastNode()
Path
lastNode in interface Path<N,E extends Edge<N>>public boolean removeFirstNode()
PathReturns true if this path is not empty (or equivalently, if this path changed as a result of the call).
removeFirstNode in interface Path<N,E extends Edge<N>>public boolean removeLastNode()
PathReturns true if this path is not empty (or equivalently, if this path changed as a result of the call).
removeLastNode in interface Path<N,E extends Edge<N>>public boolean addNode(N node)
GraphMore formally, adds the specified node n to this graph if the graph contains no element n2 such that n.equals(n2)) . If this graph already contains the element, the call leaves the graph unchanged and returns false.
addNode in interface Graph<N,E extends Edge<N>>addNode in class Subgraph<N,E extends Edge<N>>node - node to be added to this graph
public boolean addEdge(E edge)
GraphMore formally, adds the specified edge e to this graph if the graph contains no element e2 such that e.equals(e2)) . If this graph already contains the element, the call leaves the graph unchanged and returns false.
addEdge in interface Graph<N,E extends Edge<N>>addEdge in class Subgraph<N,E extends Edge<N>>edge - edge to be added to this graph
public Path<N,E> concat(Path<N,E> other)
Path
If the length of the specified path is 0, then this path is returned. Otherwise the elements of the
specified are only added to the end of this path if the target node of the last element of this path is equal to
the source node of the first element of the specified path.
concat in interface Path<N,E extends Edge<N>>other - the path to be concatenated to the end of this path
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||