Scala Library
|
|
trait
MutableIterator[A]
extends
Iterator[A]Method Summary | |
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, slice, append, ++, flatMap, filter, takeWhile, dropWhile, zip, zipWithIndex, foreach, forall, exists, contains, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, buffered, counted, duplicate, copyToArray, readInto, readInto, readInto, copyToBuffer, toList, collect, mkString, mkString, mkString, addString, toString |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Class Summary | |
class
|
Map
[B](f : (A) => B) extends MutableIterator[B]
Standard implementation of a mapped iterator.
|
Method Details |
abstract
def
remove : Unit
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.
Scala Library
|
|