@ProviderType public class ResourceStream extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.sling.api.resource.Resource |
resource |
Constructor and Description |
---|
ResourceStream(org.apache.sling.api.resource.Resource resource) |
Modifier and Type | Method and Description |
---|---|
Stream<org.apache.sling.api.resource.Resource> |
listChildren(Predicate<org.apache.sling.api.resource.Resource> childSelector)
Provides a stream of the child resources of the base resource.
|
Stream<org.apache.sling.api.resource.Resource> |
stream(Predicate<org.apache.sling.api.resource.Resource> branchSelector)
Provides a depth first
Stream<Resource> traversal of the resource
tree starting with the current resource. |
public ResourceStream(org.apache.sling.api.resource.Resource resource)
public Stream<org.apache.sling.api.resource.Resource> stream(Predicate<org.apache.sling.api.resource.Resource> branchSelector)
Stream<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 endsbranchSelector
- used to determine whether a given child resource is traversedStream<Resource>
of unknown size.public Stream<org.apache.sling.api.resource.Resource> listChildren(Predicate<org.apache.sling.api.resource.Resource> childSelector)
childSelector
- Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.