Package org.apache.sling.resource.filter
Class ResourceStream
java.lang.Object
org.apache.sling.resource.filter.ResourceStream
Utility to create a Stream of Resource objects from a managed
traversal of a Resource tree
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlistChildren
(Predicate<Resource> childSelector) Provides a stream of the child resources of the base resource.Provides a depth firstStream<Resource>
traversal of the resource tree starting with the current resource.
-
Field Details
-
resource
-
-
Constructor Details
-
ResourceStream
-
-
Method Details
-
stream
Provides a depth firstStream<Resource>
traversal of the resource tree starting with the current resource. The traversal is controlled by the provided predicate which determines if a given child is traversed. If no children matches the predicate, the traversal for that branch ends- Parameters:
branchSelector
- used to determine whether a given child resource is traversed- Returns:
Stream<Resource>
of unknown size.
-
listChildren
Provides a stream of the child resources of the base resource. The predicate is a filter to determine which of the children are returned- Parameters:
childSelector
-- Returns:
-