Class SimpleElementForest

    • Constructor Detail

      • SimpleElementForest

        protected SimpleElementForest​(@Nonnull
                                      API api)
    • Method Detail

      • getRoots

        public SortedSet<? extends SimpleElement> getRoots()
        Description copied from interface: ElementForest
        A sorted set of all root elements of the forest. The set uses the natural order of the element implementations.
        Specified by:
        getRoots in interface ElementForest
        the roots elements of the forest.
      • stream

        public Stream stream​(Class resultType,
                             boolean recurse,
                             TreeFilter filter,
                             Element root)
        Description copied from interface: ElementForest
        Walks through the forest and returns a stream of elements that match the provided filter.
        Specified by:
        stream in interface ElementForest
        resultType - the expected type of results
        recurse - whether to recursively descend into children. If false, only the direct children of the root are searched.
        filter - the filter to use when looking for matching children
        root - the search root. If null, the whole element forest is searched
        the stream of the matching elements