Package org.eclipse.net4j.util.collection

## Class LimitedIterator<T>

- java.lang.Object
- - org.eclipse.net4j.util.collection.AbstractIterator<T>
  - - org.eclipse.net4j.util.collection.AbstractFilteredIterator<T>
    - - org.eclipse.net4j.util.collection.LimitedIterator<T>

- All Implemented Interfaces:
    `java.util.Iterator<T>`

      public class LimitedIterator<T>
      extends AbstractFilteredIterator<T>

  Since:
    3.3
  Author:
    Eike Stepper

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.eclipse.net4j.util.collection.AbstractFilteredIterator

      `AbstractFilteredIterator.Predicated<T>`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.net4j.util.collection.AbstractIterator

      `END_OF_DATA`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `LimitedIterator​(java.util.Iterator<T> delegate, int limit)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getCount()` |
    `int` | `getLimit()` |
    `protected boolean` | `isValid​(T element)` |

    - ### Methods inherited from class org.eclipse.net4j.util.collection.AbstractFilteredIterator

      `computeNextElement, remove`

    - ### Methods inherited from class org.eclipse.net4j.util.collection.AbstractIterator

      `empty, hasNext, next`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining`

- - ### Constructor Detail

    - #### LimitedIterator

          public LimitedIterator​(java.util.Iterator<T> delegate,
                                 int limit)

  - ### Method Detail

    - #### getLimit

          public final int getLimit()

    - #### getCount

          public final int getCount()

    - #### isValid

          protected boolean isValid​(T element)

      Specified by:
        `isValid` in class `AbstractFilteredIterator<T>`