|
||||||||||
| 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.AbstractBaseListenableGraph<N,E>
N - the node types.E - the edge types.public abstract class AbstractBaseListenableGraph<N,E extends Edge<N>>
Super class for all directed graphs that support listeners on structural change events.
| Constructor Summary | |
|---|---|
AbstractBaseListenableGraph()
|
|
| Method Summary | |
|---|---|
boolean |
addEdge(E edge)
Adds the specified edge to this graph if it is not already present (optional operation). |
void |
addListener(GraphListener<N,E> listener)
Adds the specified graph listener. |
boolean |
addNode(N node)
Adds the specified node to this graph if it is not already present (optional operation). |
boolean |
hasListeners()
Indicates whether this graph contains any listeners. |
boolean |
removeEdge(E edge)
Removes the specified edge e from this graph if it is present (optional operation). |
void |
removeListener(GraphListener<N,E> listener)
Removes the specified listener. |
boolean |
removeNode(N node)
Removes the specified node n from this graph if it is present (optional operation). |
| Methods inherited from class com.kuka.graph.impl.AbstractBaseGraph |
|---|
clone, containsEdge, containsNode, edges, getEdge, incomingEdges, neighbors, nodes, outgoingEdges |
| Methods inherited from class com.kuka.graph.impl.AbstractGraph |
|---|
addAllEdges, addAllNodes, clear, containsAllEdges, containsAllNodes, containsEdge, edges, edgeSize, isEmpty, iterator, 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, retainAllEdges, retainAllNodes |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Constructor Detail |
|---|
public AbstractBaseListenableGraph()
| Method Detail |
|---|
public final boolean hasListeners()
ListenableGraph
hasListeners in interface ListenableGraph<N,E extends Edge<N>>public final void addListener(GraphListener<N,E> listener)
ListenableGraph
addListener in interface ListenableGraph<N,E extends Edge<N>>listener - the listener for graph eventspublic final void removeListener(GraphListener<N,E> listener)
ListenableGraph
removeListener in interface ListenableGraph<N,E extends Edge<N>>listener - listener to removepublic 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 AbstractBaseGraph<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 AbstractBaseGraph<N,E extends Edge<N>>edge - edge to be added to this graph
public boolean removeNode(N node)
GraphMore formally, removes a node n* such that n.equals(n*) , if this graph contains such a node. Furthermore, all edges incident to this node are removed. Returns true if this graph contained the node (or equivalently, if this graph changed as a result of the call).
removeNode in interface Graph<N,E extends Edge<N>>removeNode in class AbstractBaseGraph<N,E extends Edge<N>>node - node to be removed from this graph, if present
public boolean removeEdge(E edge)
GraphMore formally, removes an edge e* such that e.equals(e*), if this graph contains such an edge. Returns true if this graph contained the edge (or equivalently, if this graph changed as a result of the call).
removeEdge in interface Graph<N,E extends Edge<N>>removeEdge in class AbstractBaseGraph<N,E extends Edge<N>>edge - edge to be removed from this graph, if present
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||