in scala
object Iterator

object Iterator
extends Object
with ScalaObject

The Iterator object provides various functions for creating specialized iterators.
Author:
Martin Odersky, Matthias Zenger
Version:
1.1, 04/02/2004

Method Summary
final def empty[a]: Iterator[a]
final def from(lo: Int): Iterator[Int]
     Create an iterator with elements en+1 = en + 1 where e0 = lo.
final def from(lo: Int, step: Int): Iterator[Int]
     Create an iterator with elements en+1 = en + step where e0 = lo.
final def from(lo: Int, step: (Int) => Int): Iterator[Int]
     Create an iterator with elements en+1 = step(en) where e0 = lo.
final def fromArray[a](xs: Array[a]): Iterator[a]
final def fromCaseClass(n: CaseClass): Iterator[Any]
final def fromString(str: String): Iterator[Char]
final def fromValues[a](xs: a*): Iterator[a]
final def range(lo: Int, end: Int): Iterator[Int]
     Create an iterator with elements en+1 = en + 1 where e0 = lo and ei < end.
final def range(lo: Int, end: Int, step: Int): Iterator[Int]
     Create an iterator with elements en+1 = en + step where e0 = lo and ei < end.
final def range(lo: Int, end: Int, step: (Int) => Int): Iterator[Int]
     Create an iterator with elements en+1 = step(en) where e0 = lo and ei < end.

Method Detail

empty

  final def empty[a]: Iterator[a]

fromValues

  final def fromValues[a](xs: a*): Iterator[a]

fromArray

  final def fromArray[a](xs: Array[a]): Iterator[a]

fromString

  final def fromString(str: String): Iterator[Char]

fromCaseClass

  final def fromCaseClass(n: CaseClass): Iterator[Any]

range

  final def range(lo: Int, end: Int): Iterator[Int]
Create an iterator with elements en+1 = en + 1 where e0 = lo and ei < end.
Parameters:
lo - the start value of the iterator
end - the end value of the iterator
Returns:
the iterator with values in range [lo;end).

range

  final def range(lo: Int, end: Int, step: Int): Iterator[Int]
Create an iterator with elements en+1 = en + step where e0 = lo and ei < end.
Parameters:
lo - the start value of the iterator
end - the end value of the iterator
step - the increment value of the iterator
Returns:
the iterator with values in range [lo;end).

range

  final def range(lo: Int, end: Int, step: (Int) => Int): Iterator[Int]
Create an iterator with elements en+1 = step(en) where e0 = lo and ei < end.
Parameters:
lo - the start value of the iterator
end - the end value of the iterator
step - the increment function of the iterator
Returns:
the iterator with values in range [lo;end).

from

  final def from(lo: Int): Iterator[Int]
Create an iterator with elements en+1 = en + 1 where e0 = lo.
Parameters:
lo - the start value of the iterator
Returns:
the iterator starting at value lo.

from

  final def from(lo: Int, step: Int): Iterator[Int]
Create an iterator with elements en+1 = en + step where e0 = lo.
Parameters:
lo - the start value of the iterator
step - the increment value of the iterator
Returns:
the iterator starting at value lo.

from

  final def from(lo: Int, step: (Int) => Int): Iterator[Int]
Create an iterator with elements en+1 = step(en) where e0 = lo.
Parameters:
lo - the start value of the iterator
step - the increment function of the iterator
Returns:
the iterator starting at value lo.