|
||||||||||
| 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.FastUncheckedPath<N,E>
N - the type of nodesE - the type of edgespublic class FastUncheckedPath<N,E extends Edge<N>>
Implements a path. It is assumed that the edges are inserted in the order of the path.
| Constructor Summary | |
|---|---|
FastUncheckedPath()
|
|
| Method Summary | |
|---|---|
boolean |
addEdge(E edge)
Adds the specified edge 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. |
E |
createEdge(N source,
N target)
Creates a new edge from the specified source node to the target node, adds it to this graph and returns the created edge. |
N |
createNode()
Creates a new node, adds it to this graph and returns the created node. |
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.AbstractBaseGraph |
|---|
addNode, 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, addNode, clear, containsAllEdges, containsAllNodes, containsEdge, containsEdge, containsNode, edges, edges, edgeSize, getEdge, incomingEdges, isEmpty, neighbors, nodes, nodes, nodeSize, outgoingEdges, removeAllEdges, removeAllNodes, removeEdge, removeEdge, removeNode, retainAllEdges, retainAllNodes |
| Constructor Detail |
|---|
public FastUncheckedPath()
| 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 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 AbstractBaseGraph<N,E extends Edge<N>>edge - edge to be added to this graph
public N createNode()
Graph
createNode in interface Graph<N,E extends Edge<N>>
public E createEdge(N source,
N target)
Graph
createEdge in interface Graph<N,E extends Edge<N>>source - the source node of the edge that is to be createdtarget - the target node of the edge that is to be created
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 | |||||||||