LimitingIterable (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

org.neo4j.helpers.collection

## Class LimitingIterable<T>

- java.lang.Object
- - org.neo4j.helpers.collection.LimitingIterable<T>

- Type Parameters:
    `T` - the type of items in this `Iterable`.
  All Implemented Interfaces:
    Iterable<T>

      public class LimitingIterable<T>
      extends Object
      implements Iterable<T>

  Limits the amount of items returned by an `Iterable`, or rather `Iterator`s spawned from it.
  Author:
    Mattias Persson
  See Also:
    `LimitingIterator`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LimitingIterable(Iterable<T> source, int limit)` Instantiates a new limiting `Iterable` which can limit the number of items returned from iterators it spawns.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Iterator<T>` | `iterator()`

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

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

- - ### Constructor Detail

    - #### LimitingIterable

          public LimitingIterable(Iterable<T> source,
                          int limit)

      Instantiates a new limiting `Iterable` which can limit the number of items returned from iterators it spawns.
      Parameters:
        `source` - the source of items.
        `limit` - the limit, i.e. the max number of items to return.

  - ### Method Detail

    - #### iterator

          public Iterator<T> iterator()

      Specified by:
        `iterator` in interface `Iterable<T>`

Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.