scala.collection.jcl

trait BufferIterator

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

trait BufferIterator[K, A]
extends SeqIterator[K, A]
An iterator for a buffer that supports element update and insertion.
Author
Sean McDirmid
Direct Known Subclasses:
Buffer.DefaultBufferIterator, Buffer.Range.RangeIterator, BufferWrapper.IteratorWrapper

Method Summary
abstract def add (a : A) : Unit
Inserts "a" after the iterator's cursor. If next was last called, "a" is inserted after the element returned. If previous was last called, "a" is inserted before the element returned.
abstract def set (a : A) : Unit
Sets the element before this iterator's cursor to "a." Replaces either the last element returned by "next" or, if previous was called, the next element that would be return by "previous."
Methods inherited from SeqIterator
nextIndex (abstract), previousIndex (abstract), previous (abstract), hasPrevious (abstract), seek, indexOf, map
Methods inherited from MutableIterator
remove (abstract), has, remove, retain
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
Method Details
abstract def set(a : A) : Unit
Sets the element before this iterator's cursor to "a." Replaces either the last element returned by "next" or, if previous was called, the next element that would be return by "previous."

abstract def add(a : A) : Unit
Inserts "a" after the iterator's cursor. If next was last called, "a" is inserted after the element returned. If previous was last called, "a" is inserted before the element returned.