Package jetbrains.buildServer.util.graph
Interface ReachabilityIndex<T>
-
- All Known Subinterfaces:
ReachabilityIndexExt<T>
- All Known Implementing Classes:
ReachabilityIndexExtImpl
public interface ReachabilityIndex<T>Allows to do fast checks if some node from DAG is reachable from another node
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Predicate<T>createReachablePredicate(T from)Returns a reachability predicate which returns true if the node is reachable from the specified nodefrom.booleanisReachable(T node, T from)Returns true if the given nodenodeis reachable from specified nodefrom.voidprocessReachable(T from, ItemProcessor<T> processor)Process all reachable nodes from the given nodefromwith specified processor.
-
-
-
Method Detail
-
isReachable
boolean isReachable(@NotNull T node, @NotNull T from)Returns true if the given nodenodeis reachable from specified nodefrom. Node is reachable from itself.- Parameters:
node- a node which reachability should be testedfrom- a node from which reachability should be tested- Returns:
- see above
-
processReachable
void processReachable(@NotNull T from, @NotNull ItemProcessor<T> processor)Process all reachable nodes from the given nodefromwith specified processor. The nodefromis also processed.- Parameters:
from- a node which reachable nodes to processprocessor- nodes processor
-
-