FirstItemIterable (Neo4j Community 1.8.RC1 API)
Date: 2012-09-07

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Neo4j Community
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.neo4j.helpers.collection
Class FirstItemIterable<T>

    java.lang.Object
      org.neo4j.helpers.collection.FirstItemIterable<T>

Type Parameters:
  `T` -

All Implemented Interfaces:
  Iterable<T>

    public class FirstItemIterable<T>

extends Object
implements Iterable<T>

Wraps the given iterator but keeps the first item to allow later access to it, like CachingIterator but with less memory overhead.

Constructor Summary
`FirstItemIterable(Iterable<T> data)`
`FirstItemIterable(Iterator<T> iterator)`

Method Summary
`T` | `getFirst()`
`Iterator<T>` | `iterator()`

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

Constructor Detail

### FirstItemIterable

    public FirstItemIterable(Iterable<T> data)

### FirstItemIterable

    public FirstItemIterable(Iterator<T> iterator)

Method Detail

### iterator

    public Iterator<T> iterator()

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

### getFirst

    public T getFirst()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Neo4j Community
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.