Package org.apache.sling.scripting.sightly.impl.compiler.util.stream

## Class Streams

- java.lang.Object
- - org.apache.sling.scripting.sightly.impl.compiler.util.stream.Streams

    public class Streams
    extends Object

Utility functions for streams.

### Constructor Summary

Constructors
`Streams()`

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `connect​(CommandStream inStream, PushStream outStream, CommandVisitor visitor)` Attach the visitor as a handle to the inStream and propagate the done signal from the inStream to the outStream
`static CommandStream` `map​(CommandStream inStream, EmitterVisitor emitterVisitor)` Attach the emitting visitor to the inStream.

### Methods inherited from class java.lang.Object

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

### Constructor Detail

#### Streams

    public Streams()

### Method Detail

#### connect

    public static void connect​(CommandStream inStream,
                               PushStream outStream,
                               CommandVisitor visitor)

Attach the visitor as a handle to the inStream and propagate the done signal from the inStream to the outStream

Parameters:
  `inStream` - - the input stream
  `outStream` - - the output stream
  `visitor` - - a command visitor

#### map

    public static CommandStream map​(CommandStream inStream,
                                    EmitterVisitor emitterVisitor)

Attach the emitting visitor to the inStream.

Parameters:
  `inStream` - - the input stream
  `emitterVisitor` - - the emitter visitor
Returns:
  - the output stream of the emitter