@NotNull
  private Set<Integer> getWalkNodes(int startNode, boolean isUp, Condition<? super Integer> stopFunction) {
    Set<Integer> walkNodes = new HashSet<>();

    TreeSetNodeIterator walker = new TreeSetNodeIterator(startNode, isUp);
    while (walker.notEmpty()) {
      Integer next = walker.pop();
      if (!stopFunction.value(next)) {
        walkNodes.add(next);
        walker.addAll(getNodes(next, isUp));
      }
    }

    return walkNodes;
  }
@NotNull
  private Set<Integer> getWalkNodes(int startNode, boolean isUp, Condition<? super Integer> stopFunction)