## org.apache.mahout.common.iterator
Class CountingIterator

    java.lang.Object
      com.google.common.collect.UnmodifiableIterator<T>
          com.google.common.collect.AbstractIterator<Integer>
              org.apache.mahout.common.iterator.CountingIterator

All Implemented Interfaces:
  Iterator<Integer>

    public final class CountingIterator

extends com.google.common.collect.AbstractIterator<Integer>

Iterates over the integers from 0 through `to-1`.

Constructor Summary
`CountingIterator(int to)`

Method Summary
`protected Integer` `computeNext()`

Methods inherited from class com.google.common.collect.AbstractIterator
`endOfData, hasNext, next, peek`

Methods inherited from class com.google.common.collect.UnmodifiableIterator
`remove`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CountingIterator

    public CountingIterator(int to)

Method Detail

### computeNext

    protected Integer computeNext()

  Specified by:
    `computeNext` in class `com.google.common.collect.AbstractIterator<Integer>`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.