Class Stream::CollectionStream
In: lib/stream.rb
Parent: BasicStream

A CollectionStream can be used as an external iterator for each interger-indexed collection. The state of the iterator is stored in instance variable @pos.

A CollectionStream for an array is created by the method Array#create_stream.

Methods

Attributes

pos  [R] 

Public Class methods

Creates a new CollectionStream for the indexable sequence seq.

Public Instance methods

Protected Instance methods

basic_current and basic_peek can be implemented more efficiently than in superclass

[Validate]