scala

trait CountedIterator

[source: scala/CountedIterator.scala]

@deprecated("use iterator.zipWithIndex instead")

trait CountedIterator[+A]
extends Iterator[A]
Counted iterators keep track of the number of elements seen so far
Method Summary
abstract def count : Int
counts the elements in this iterator; counts start at 0
override def counted : CountedIterator[A]
Returns a counted iterator from this iterator.
Methods inherited from Iterator
hasNext (abstract), next (abstract), take, drop, slice, map, ++, flatMap, filter, takeWhile, partition, dropWhile, zip, padTo, zipWithIndex, zipAll, foreach, forall, exists, contains, find, indexWhere, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, reduceLeftOpt, reduceRightOpt, buffered, length, duplicate, patch, copyToArray, copyToArray, copyToArray, copyToBuffer, toList, toStream, toSequence, mkString, mkString, mkString, addString, addString, addString, toString, append, findIndexOf, collect, readInto, readInto, readInto
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[A]
Returns a counted iterator from this iterator.
Overrides
Iterator.counted