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

## org.apache.lucene.search
Class HitIterator

    java.lang.Object
      org.apache.lucene.search.HitIterator

All Implemented Interfaces:
  Iterator

Deprecated. Hits will be removed in Lucene 3.0. Use `TopDocCollector` and `TopDocs` instead.

    public class HitIterator

extends Object
implements Iterator

An iterator over `Hits` that provides lazy fetching of each document. `Hits.iterator()` returns an instance of this class. Calls to `next()` return a `Hit` instance.

Method Summary
`boolean` | `hasNext()` Deprecated.
`int` | `length()` Deprecated. Returns the total number of hits.
`Object` | `next()` Deprecated. Returns a `Hit` instance representing the next hit in `Hits`.
`void` | `remove()` Deprecated. Unsupported operation.

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

Method Detail

### hasNext

    public boolean hasNext()

  Deprecated.
  Specified by:
    `hasNext` in interface `Iterator`
  Returns:
    true if current hit is less than the total number of `Hits`.

### next

    public Object next()

  Deprecated.
  Returns a `Hit` instance representing the next hit in `Hits`.

  Specified by:
    `next` in interface `Iterator`
  Returns:
    Next `Hit`.

### remove

    public void remove()

  Deprecated.
  Unsupported operation.

  Specified by:
    `remove` in interface `Iterator`
  Throws:
    `UnsupportedOperationException`

### length

    public int length()

  Deprecated.
  Returns the total number of hits.

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

Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.