Package org.apache.sling.resource.filter

# Klasse ResourceStream

java.lang.Object
org.apache.sling.resource.filter.ResourceStream

@ProviderType public class ResourceStream extends Object
Utility to create a Stream<Resource> of Resource objects from a managed traversal of a Resource tree

## Feldübersicht

Felder
Modifizierer und Typ
Feld
Beschreibung
`protected org.apache.sling.api.resource.Resource`
`resource`

## Konstruktorübersicht

Konstruktoren
Konstruktor
Beschreibung
`ResourceStream(org.apache.sling.api.resource.Resource resource)`

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`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.

### Von Klasse geerbte Methoden java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Felddetails

### resource

protected org.apache.sling.api.resource.Resource resource

## Konstruktordetails

### ResourceStream

public ResourceStream(org.apache.sling.api.resource.Resource resource)

## Methodendetails

### stream

public 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. 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

Parameter:
  `branchSelector` - used to determine whether a given child resource is traversed
Gibt zurück:
  `Stream<Resource>` of unknown size.

### listChildren

public 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. The predicate is a filter to determine which of the children are returned

Parameter:
  `childSelector` -
Gibt zurück: