Package cdc.graphs.impl
Class GraphFilter<N,E>
- java.lang.Object
-
- cdc.graphs.impl.GraphFilter<N,E>
-
- Type Parameters:
N- Node classE- Edge class
- All Implemented Interfaces:
GraphAdapter<N,E>
- Direct Known Subclasses:
ExplicitSubGraph,ImplicitSubGraph,InvertedGraph
public abstract class GraphFilter<N,E> extends Object implements GraphAdapter<N,E>
Base class used to filter a graph and make it appear as another graph.- Author:
- Damien Carbonne
-
-
Field Summary
Fields Modifier and Type Field Description protected GraphAdapter<N,E>delegate
-
Constructor Summary
Constructors Modifier Constructor Description protectedGraphFilter(GraphAdapter<N,E> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckEdgeValidity(E edge)Checks that an edge belongs to delegate.protected voidcheckNodeValidity(N node)Checks that a node belongs to delegate.GraphAdapter<N,E>getDelegate()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cdc.graphs.GraphAdapter
containsEdge, containsNode, getConnectedNodes, getConnectedNodes, getConnectivity, getEdges, getEdges, getEdges, getEdges, getEdges, getEdges, getEdgesCount, getEdgesCount, getEdgesCount, getEdgesStream, getEdgesStream, getEdgesStream, getLeaves, getNodes, getNodes, getNodesCount, getNodesStream, getRoots, getTip, hasEdge, hasEdges, hasEdges, hasEdges, hasNodes, isLeaf, isRoot
-
-
-
-
Field Detail
-
delegate
protected final GraphAdapter<N,E> delegate
-
-
Constructor Detail
-
GraphFilter
protected GraphFilter(GraphAdapter<N,E> delegate)
-
-
Method Detail
-
checkNodeValidity
protected void checkNodeValidity(N node)
Checks that a node belongs to delegate.- Parameters:
node- The tested node.- Throws:
IllegalArgumentException- When delegate does not contain node.
-
checkEdgeValidity
protected void checkEdgeValidity(E edge)
Checks that an edge belongs to delegate.- Parameters:
edge- The tested edge.- Throws:
IllegalArgumentException- When delegate does not contain edge.
-
getDelegate
public final GraphAdapter<N,E> getDelegate()
-
-