scala
trait CountedIterator

[source: `scala/CountedIterator.scala`]

`` `trait` CountedIterator[+A]
  `extends` Iterator[A]

  Counted iterators keep track of the number of elements seen so far

Author
  Martin Odersky
Version
  1.0, 16/07/2003

Method Summary
`override def` | buffered : BufferedIterator[A]`with` CountedIterator[A] Returns a buffered iterator from this iterator.
`abstract def` | count : Int counts the elements in this iterator; counts start at 0
`override def` | counted : CountedIterator Returns a counted iterator from this iterator.

Methods inherited from Iterator
hasNext (abstract), next (abstract), take, drop, map, append, ++, flatMap, filter, takeWhile, dropWhile, zip, zipWithIndex, foreach, forall, exists, contains, find, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, 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

Method Details

`abstract` `def` count : Int

  counts the elements in this iterator; counts start at 0

`override` `def` counted : CountedIterator

  Returns a counted iterator from this iterator.

Overrides
  Iterator.counted

`override` `def` buffered : BufferedIterator[A]`with` CountedIterator[A]

  Returns a buffered iterator from this iterator.

Overrides
  Iterator.buffered