Package org.savantbuild.util
Interface Graph.EdgeFilter<T,U>
- Type Parameters:
T- The node type.U- The edge type.
- All Known Implementing Classes:
Graph.EdgeFilter.IdentityEdgeFilter,Graph.EdgeFilter.SingleTraversalEdgeFilter
public static interface Graph.EdgeFilter<T,U>
Edge filter that determines if an edge should be included in a traversal. This can be based solely on the edge value or it can be based on the entry point to the current node. For this graph:
A -1-> B -2-> C
If you are at B traversing to C, edge will be '2' and entryPoint will be '1'.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAn edge filter that always returns true.static classAn edge filter that only returns true if an edge has not been traversed yet. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfilter(Graph.Edge<T, U> edge, Graph.Edge<T, U> entryPoint) Tests the edge.
-
Method Details
-
filter
Tests the edge.- Parameters:
edge- The edge.entryPoint- The entry point to the current node.- Returns:
- True if the edge should be kept, false if it should be ignored.
-