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.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, 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
`class` | Map [B](f : (A) => B)`extends` Map[B]`with` SeqIterator[K, B] Standard implementation of a mapped iterator.

Method Details

`abstract` `def` nextIndex : K

Returns
  s The index at the iterator's cursor.

`abstract` `def` previousIndex : K

Returns
  s The index of the element before the iterator's cursor.

`abstract` `def` previous : A

Returns
  The previous element, will move the iterator's cursor backwards.

`abstract` `def` hasPrevious : Boolean

Returns
  True if and only if the iterator's cursor is not at the beging of the iteration.

`` `def` seek(idx : K) : A

  Winds the iteration forward until index "idx" is found

`` `def` indexOf(a : A) : Option[K]

  finds the index of the next "a" in this iteration.

Parameters
  `a -` ..
Returns
  `None` if "a" is not found in the 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`.

Overrides
  MutableIterator.map