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
`abstract def` | count : Int counts the elements in this iterator; counts start at 0

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, 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

Method Details

`abstract` `def` count : Int

  counts the elements in this iterator; counts start at 0