Scala Library
|
|
scala/BufferedIterator.scala
]
abstract
class
Default[+A]
extends
PutBack[A]Method Summary | |
protected override def
|
defaultPeek
: A
element returned when no element left to iterate over;
throws
NoSuchElementException by default |
protected abstract def
|
fill
(sz : Int) : Seq[A]
used to fill lookahead buffer.
sz can be used by implementations as a heauristic to determine how many elements are desired |
override def
|
hasNext
: Boolean
Does this iterator provide another element?
|
override def
|
next
: A
Returns the next element.
|
override def
|
peekList
(sz : Int) : Seq[A]
returns the first
sz elements that will be iterated by this iterator,
or fewer if the iterator has less elements left to iterate over |
protected[this] override def
|
putBack (a : A) : Unit |
Methods inherited from PutBack | |
counted, flushFrom |
Methods inherited from Advanced | |
head, peek, startsWith, readIfStartsWith, toString, advanced |
Methods inherited from BufferedIterator | |
headOpt, buffered, readIf, readWhile |
Methods inherited from Iterator | |
take, drop, slice, map, append, ++, flatMap, filter, takeWhile, dropWhile, zip, zipWithIndex, foreach, forall, exists, contains, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, duplicate, copyToArray, readInto, readInto, readInto, copyToBuffer, toList, collect, mkString, mkString, mkString, addString |
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 |
protected override
def
defaultPeek : A
NoSuchElementException
by defaultoverride
def
hasNext : Boolean
sz
can be used by implementations as a heauristic to determine how many elements are desiredsz
elements that will be iterated by this iterator,
or fewer if the iterator has less elements left to iterate overoverride
def
next : A
Scala Library
|
|