scala.collection.jcl

trait SeqIterator

[source: scala/collection/jcl/SeqIterator.scala]

trait SeqIterator[K, A]
extends MutableIterator[A]
An iterator for a sequence that can move both forwards and backwards. over a set of ordered keys.
Author
Sean McDirmid
Direct Known Subclasses:
BufferIterator, MutableSeq.DefaultSeqIterator, MutableSeq.Filter.FilterIterator, SeqIterator.Map

Method Summary
abstract def hasPrevious : Boolean
def indexOf (a : A) : Option[K]
finds the index of the next "a" in this iteration.
override def map [B](f : (A) => B) : SeqIterator[K, B]
Returns a new iterator that maps all elements of this iterator to new elements using function f.
abstract def nextIndex : K
abstract def previous : A
abstract def previousIndex : K
def seek (idx : K) : A
Winds the iteration forward until index "idx" is found
Methods inherited from MutableIterator
remove (abstract), filter, has, remove, retain, buffered0
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, readInto, readInto, readInto, copyToBuffer, toList, 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 Map[B] with SeqIterator[K, B]
Standard implementation of a mapped iterator.