Class Streams


  • public class Streams
    extends Object
    Utility functions for streams.
    • 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