net.sourceforge.combean.graph.decorators
Class AbstractDecoratedGraph
java.lang.Object
net.sourceforge.combean.graph.decorators.AbstractDecoratedGraph
- All Implemented Interfaces:
- Graph, NestedGraphProp
- Direct Known Subclasses:
- OrderedNodesGraph, ResidualNetworkGraph, TransposedGraph
public abstract class AbstractDecoratedGraph
- extends Object
- implements NestedGraphProp
Convenience base class for decorators of graphs, i.e., classes which
implement a graph property and enhance the functionality of an inner
graph property object by intercepting calls to it.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractDecoratedGraph
public AbstractDecoratedGraph(Graph g)
- Constructor
- Parameters:
g
- the graph to be decorated
getNodeClass
public Class getNodeClass()
- Specified by:
getNodeClass
in interface Graph
getEdgeClass
public Class getEdgeClass()
- Specified by:
getEdgeClass
in interface Graph
getNestedGraph
public Graph getNestedGraph()
- Specified by:
getNestedGraph
in interface NestedGraphProp
- Returns:
- the nested graph
isModifiableGraphProp
protected boolean isModifiableGraphProp(Class wantedProp)
- Check whether the given property refers to the fact that the graph
shall be modifiable
- Parameters:
wantedProp
-
- Returns:
- true if either the set of edges or of the nodes in the graph
is modifiable.