Class Stream::ConcatenatedStream
In: lib/stream.rb
Parent: WrappedStream

Given a stream of streams. Than a ConcatenatedStream is obtained by concatenating these in the given order. A ConcatenatedStream is created by the methods Stream#concatenate or Stream#concatenate_collected send to a stream of streams or by the method + which concatenats two streams:

 ((1..3).create_stream + [4,5].create_stream).to_a ==> [1, 2, 3, 4, 5]

Methods

External Aliases

wrapped_stream -> streamOfStreams

Public Class methods

Creates a new ConcatenatedStream wrapping the stream of streams streamOfStreams.

Public Instance methods

Same as at_end? the other way round.

If the current stream is at end, than at_end? has to look ahead to find a non empty in the stream of streams, which than gets the current stream.

Returns the previous element of @currentStream. at_beginning? ensured that there is one.

Returns the next element of @currentStream. at_end? ensured that there is one.

[Validate]