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
Enclosing interface:
Graph<T,U>

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'.

  • Method Details

    • filter

      boolean filter(Graph.Edge<T,U> edge, Graph.Edge<T,U> entryPoint)
      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.