org.apache.lucene.search
Class HitIterator

java.lang.Object
  extended by org.apache.lucene.search.HitIterator
All Implemented Interfaces:
Iterator

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

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.



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