code: private static Treenode search(Iterable<Treenode> root, String text, ITreenodeSearch search) {
          for (Treenode node : root) {
              if (search.isMatch(node, text)) {
                  return node;
              }
          }
          return null;
      }
docs: Search the tree for a tree node whose label contains the specified text.
  
  @param root Node where search should begin.
  @param text Text to find.
  @param search Search logic.
  @return The first matching tree item after the last item, or null if none found.