Package org.revapi.simple
Class SimpleElementForest
- java.lang.Object
-
- org.revapi.simple.SimpleElementForest
-
- All Implemented Interfaces:
ElementForest
@Deprecated public class SimpleElementForest extends Object implements ElementForest
Deprecated.useBaseElementForest
insteadA simple element forest ofSimpleElement
s.- Since:
- 0.1
- Author:
- Lukas Krejci
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.revapi.ElementForest
ElementForest.Visitor<E extends Element<E>>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SimpleElementForest(API api)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description API
getApi()
Deprecated.SortedSet<? extends SimpleElement>
getRoots()
Deprecated.A sorted set of all root elements of the forest.protected SortedSet<? extends SimpleElement>
newRootsInstance()
Deprecated.<T extends Element>
List<T>search(Class<T> resultType, boolean recurse, TreeFilter filter, Element root)
Deprecated.<T extends Element>
voidsearch(List<T> results, Class<T> resultType, SortedSet<? extends Element> currentLevel, boolean recurse, Filter<? super T> filter)
Deprecated.<T extends Element>
voidsearch(List<T> results, Class<T> resultType, SortedSet<? extends Element> currentLevel, boolean recurse, TreeFilter filter)
Deprecated.Stream
stream(Class resultType, boolean recurse, TreeFilter filter, Element root)
Deprecated.Walks through the forest and returns a stream of elements that match the provided filter.String
toString()
Deprecated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.revapi.ElementForest
iterateOverElements, search, stream
-
-
-
-
Method Detail
-
getApi
@Nonnull public API getApi()
Deprecated.- Specified by:
getApi
in interfaceElementForest
- Returns:
- the API this forest represents
-
getRoots
@Nonnull public SortedSet<? extends SimpleElement> getRoots()
Deprecated.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 interfaceElementForest
- Returns:
- the roots elements of the forest.
-
stream
public Stream stream(Class resultType, boolean recurse, TreeFilter filter, @Nullable Element root)
Deprecated.Description copied from interface:ElementForest
Walks through the forest and returns a stream of elements that match the provided filter.- Specified by:
stream
in interfaceElementForest
- Parameters:
resultType
- the expected type of resultsrecurse
- 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 childrenroot
- the search root. If null, the whole element forest is searched- Returns:
- the stream of the matching elements
-
search
public <T extends Element> void search(@Nonnull List<T> results, @Nonnull Class<T> resultType, @Nonnull SortedSet<? extends Element> currentLevel, boolean recurse, @Nullable Filter<? super T> filter)
Deprecated.
-
search
public <T extends Element> List<T> search(Class<T> resultType, boolean recurse, TreeFilter filter, Element root)
Deprecated.
-
search
public <T extends Element> void search(List<T> results, Class<T> resultType, SortedSet<? extends Element> currentLevel, boolean recurse, TreeFilter filter)
Deprecated.
-
newRootsInstance
protected SortedSet<? extends SimpleElement> newRootsInstance()
Deprecated.
-
-