protected void lazyLoad() {
        if (!loaded) {
            loaded = true;

            List<T> childData = loadFunction.apply(getData());
            List<LazyDefaultTreeNode<T>> childNodes = childData
                    .stream()
                    .map(f -> new LazyDefaultTreeNode<>(f, loadFunction, isLeafFunction))
                    .collect(Collectors.toList());
            super.getChildren().addAll(childNodes);
        }
    }
Lazy version of the {@link DefaultTreeNode}.
A lazy version of the {@link CheckboxTreeNode} is still missing.

@param <T> T the data type
primefaces/src/main/java/org/primefaces/model/LazyDefaultTreeNode.java