private T findNextMatchingNode(T selection, boolean fullMatch) {
    JBIterator<T> allNodeIterator = JBIterator.from(iterate(selection, true, true));
    JBIterator<T> fullMatches = filterMatchingNodes(allNodeIterator, fullMatch)
      .filter(item -> item != selection);
    if (fullMatches.advance()) {
      return fullMatches.current();
    }
    return null;
  }
private T findNextMatchingNode(T selection, boolean fullMatch)