ChainIterator Reference
A ChainIterator chains two iterators together. It inherits from Iterator.
Constructor
Section titled “Constructor”Creates an iterator to combine with another iterator.
var iterator = ArrayIterator([0, 1, 2]);var other_iterator = ArrayIterator([3, 4, 5]);var combined_iterators = ChainIterator(iterator, other_iterator);Parameters
Section titled “Parameters”first: Iterator - The first iterator in the chain.
second: Iterator - The second iterator in the chain.
Methods
Section titled “Methods”Inherited
Section titled “Inherited”All methods are inherited from the Iterator class. See the Iterator reference for documentation.
Example
Section titled “Example”var iterator = ArrayIterator([0, 1, 2]);var other_iterator = ArrayIterator([3, 4, 5]);var combined_iterators = ChainIterator(iterator, other_iterator).for_each(println);// 0// 1// 2// 3// 4// 5