|
Scala Library
|
|
scala/Iterator.scala]
object
Iterator
extends AnyRefIterator object provides various functions for
creating specialized iterators.| Value Summary | |
val
|
empty : Iterator[Nothing] |
| Method Summary | |
def
|
flatten
[T](its : Iterator[Iterator[T]]) : Iterator[T]
Create an iterator that is the concantenation of all iterators
returned by a given iterator of iterators.
|
def
|
from
(start : Int, step : (Int) => Int) : Iterator[Int]
Create an iterator with elements
en+1 = step(en)
where e0 = start. |
def
|
from
(start : Int) : Iterator[Int]
Create an iterator with elements
en+1 = en + 1
where e0 = start. |
def
|
from
(start : Int, step : Int) : Iterator[Int]
Create an iterator with elements
en+1 = en + step
where e0 = start. |
def
|
fromArray [a](xs : Array[a]) : Iterator[a] |
def
|
fromArray [a](xs : Array[a], start : Int, length : Int) : Iterator[a] |
def
|
fromCaseClass (n : Product) : Iterator[Any] |
def
|
fromProduct (n : Product) : Iterator[Any] |
def
|
fromString (str : java.lang.String) : Iterator[Char] |
def
|
fromValues [a](xs : a*) : Iterator[a] |
def
|
range
(start : Int, end : Int) : Iterator[Int]
Create an iterator with elements
en+1 = en + 1
where e0 = start
and ei < end. However,
if start ≥ end, then it will return an empty range. |
def
|
range
(start : Int, end : Int, step : Int) : Iterator[Int]
Create an iterator with elements
en+1 = en + step
where e0 = start
and elements are in the range between start (inclusive)
and end (exclusive) |
def
|
range
(start : Int, end : Int, step : (Int) => Int) : Iterator[Int]
Create an iterator with elements
en+1 = step(en)
where e0 = start
and elements are in the range between start (inclusive)
and end (exclusive) |
def
|
single [a](x : a) : Iterator[a] |
| Methods inherited from AnyRef | |
| getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Value Details |
| Method Details |
x - the elementxs - the array of elements
def
fromArray[a](xs : Array[a], start : Int, length : Int) : Iterator[a]
xs - the array of elementsstart - the start indexlength - the length
def
fromString(str : java.lang.String) : Iterator[Char]
str - the given stringstrstr.elementsn - the product arityProduct<n>.
def
fromCaseClass(n : Product) : Iterator[Any]
fromProduct instead.en+1 = en + 1
where e0 = start
and ei < end. However,
if start ≥ end, then it will return an empty range.start - the start value of the iteratorend - the end value of the iterator[start;end).
def
range(start : Int, end : Int, step : Int) : Iterator[Int]
en+1 = en + step
where e0 = start
and elements are in the range between start (inclusive)
and end (exclusive)start - the start value of the iteratorend - the end value of the iteratorstep - the increment value of the iterator (must be positive or negative)[start;end).
def
range(start : Int, end : Int, step : (Int) => Int) : Iterator[Int]
en+1 = step(en)
where e0 = start
and elements are in the range between start (inclusive)
and end (exclusive)start - the start value of the iteratorend - the end value of the iteratorstep - the increment function of the iterator, must be monotonically increasing or decreasing[start;end).en+1 = en + 1
where e0 = start.start - the start value of the iteratorstart.en+1 = en + step
where e0 = start.start - the start value of the iteratorstep - the increment value of the iteratorstart.en+1 = step(en)
where e0 = start.start - the start value of the iteratorstep - the increment function of the iteratorstart.its - The iterator which returns on each call to next a new iterator whose elements are to be concatenated to the result.|
Scala Library
|
|