com.thinkaurelius.titan.graphdb.query

## Class ResultSetIterator<R extends TitanElement>

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.query.ResultSetIterator<R>

- All Implemented Interfaces:
    Iterator<R>

      public class ResultSetIterator<R extends TitanElement>
      extends Object
      implements Iterator<R>

  Wraps around a result set iterator to return up to the specified limit number of elements and implement the `Iterator.remove()` method based on element's remove method.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResultSetIterator(Iterator<R> inner, int limit)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()`
    `R` | `next()`
    `void` | `remove()`
    `static <R extends TitanElement> Iterable<R>` | `wrap(Iterable<R> inner, int limit)`

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

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

- - ### Constructor Detail

    - #### ResultSetIterator

          public ResultSetIterator(Iterator<R> inner,
                           int limit)

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<R extends TitanElement>`

    - #### next

          public R next()

      Specified by:
        `next` in interface `Iterator<R extends TitanElement>`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<R extends TitanElement>`

    - #### wrap

          public static <R extends TitanElement> Iterable<R> wrap(Iterable<R> inner,
                                                  int limit)

Copyright © 2012–2014. All rights reserved.