|
Scala Library Documentation
|
|
trait
MutableIterator[A]
extends Iterator[A]| Method Summary | |
def
|
buffered0 : Buffered |
override def
|
filter
(f : (A) => Boolean) : MutableIterator[A]
Returns an iterator over all the elements of this iterator that
satisfy the predicate
p. The order of the elements
is preserved. |
def
|
has
(a : A) : Boolean
A type-safe version of contains.
|
override def
|
map
[B](f : (A) => B) : MutableIterator[B]
Returns a new iterator that maps all elements of this iterator
to new elements using function
f. |
abstract def
|
remove : Unit |
def
|
remove
(a : A) : Boolean
Finds and removes the first instance of "a" through the iterator.
After execution, the iterator's cursor is located where the removed
element existed.
|
def
|
retain
(p : (A) => Boolean) : Boolean
Removes all elements in the iterator that predicate "p" returns false on.
|
| Methods inherited from Iterator | |
| hasNext (abstract), next (abstract), take, drop, append, ++, flatMap, takeWhile, dropWhile, zip, zipWithIndex, foreach, forall, exists, contains, find, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, buffered, counted, duplicate, copyToArray, copyToBuffer, toList, mkString, mkString, addString |
| Methods inherited from AnyRef | |
| getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Class Summary | |
trait
|
Buffered
extends MutableIterator[A]
|
class
|
BufferedImpl
extends Buffered
|
class
|
Map
[B](f : (A) => B) extends MutableIterator[B]
Standard implementation of a mapped iterator.
|
| Method Details |
abstract
def
remove : Unit
override
def
filter(f : (A) => Boolean) : MutableIterator[A]
p. The order of the elements
is preserved.p - the predicate used to filter the iterator.p.override
def
map[B](f : (A) => B) : MutableIterator[B]
f.a - ..false if "a" is not encountered in the iterator and the iterator's cursor is located at the end of its elements.
def
buffered0 : Buffered
|
Scala Library Documentation
|
|