Scala Library
|
|
scala/collection/Iterator.scala
]
class
GroupedIterator[B >: A](self : Iterator[A], size : Int, step : Int)
extends
Iterator[Seq[B]]Iterator[A]
into an
Iterator[Seq[A]], with configurable sequence size, step, and
strategy for dealing with elements which don't fit evenly.
Typical uses can be achieved via methods `grouped' and `sliding'.Method Summary | |
def
|
hasNext
: Boolean
Does this iterator provide another element?
|
def
|
next
: List[B]
Returns the next element of this iterator.
|
def
|
withPadding
(x : => B) : GroupedIterator[B]
Public functions which can be used to configure the iterator before use.
|
def
|
withPartial (x : Boolean) : GroupedIterator[B] |
Methods inherited from Iterator | |
take, drop, slice, map, ++, flatMap, filter, filterNot, partialMap, takeWhile, partition, dropWhile, zip, padTo, zipWithIndex, zipAll, foreach, forall, exists, contains, find, indexWhere, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, reduceLeftOption, reduceRightOption, buffered, grouped, sliding, length, duplicate, patch, copyToArray, copyToArray, copyToArray, copyToBuffer, toList, toStream, toSeq, mkString, mkString, mkString, addString, addString, addString, toString, append, findIndexOf, collect, counted, readInto, readInto, readInto |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
def
withPadding(x : => B) : GroupedIterator[B]
def
withPartial(x : Boolean) : GroupedIterator[B]
def
hasNext : Boolean
Scala Library
|
|