/** * {@inheritDoc} * @param heads Head nodes to start walking from. <strong>Do not pass multiple heads.</strong> */ @Override public FlowNode findFirstMatch(Collection<FlowNode> heads, Collection<FlowNode> blackListNodes, Predicate<FlowNode> matchCondition) { return super.findFirstMatch(heads, blackListNodes, matchCondition); }
/** * {@inheritDoc} * @deprecated unsafe to call */ @Deprecated @Override public FlowNode findFirstMatch(FlowExecution exec, Predicate<FlowNode> matchPredicate) { return super.findFirstMatch(exec, matchPredicate); }
/** * {@inheritDoc} * @deprecated prefer {@link #findFirstMatch(FlowNode, Predicate)} */ @Deprecated @Override public FlowNode findFirstMatch(Collection<FlowNode> heads, Predicate<FlowNode> matchPredicate) { return super.findFirstMatch(heads, matchPredicate); }
/** Syntactic sugar for {@link #findFirstMatch(Collection, Collection, Predicate)} where there is no blackList */ @CheckForNull public FlowNode findFirstMatch(@CheckForNull Collection<FlowNode> heads, @Nonnull Predicate<FlowNode> matchPredicate) { return this.findFirstMatch(heads, null, matchPredicate); }
/** Syntactic sugar for {@link #findFirstMatch(Collection, Collection, Predicate)} where there is a single head and no blackList */ @CheckForNull public FlowNode findFirstMatch(@CheckForNull FlowNode head, @Nonnull Predicate<FlowNode> matchPredicate) { return this.findFirstMatch(Collections.singleton(head), null, matchPredicate); }
/** Syntactic sugar for {@link #findFirstMatch(Collection, Collection, Predicate)} using {@link FlowExecution#getCurrentHeads()} to get heads and no blackList */ @CheckForNull public FlowNode findFirstMatch(@CheckForNull FlowExecution exec, @Nonnull Predicate<FlowNode> matchPredicate) { if (exec != null && exec.getCurrentHeads() != null && !exec.getCurrentHeads().isEmpty()) { return this.findFirstMatch(exec.getCurrentHeads(), null, matchPredicate); } return null; }