org.apache.lucene.limit
Class LimTermPositions

Object
  extended by LimTermPositions
All Implemented Interfaces:
TermDocs, TermPositions

public class LimTermPositions
extends Object
implements TermPositions

Used by LimIndexReader to help enforce the work limit while processing a query.

Author:
Martin Haye

Field Summary
private  LimIndexReader reader
           
private  TermPositions wrapped
           
 
Constructor Summary
LimTermPositions(LimIndexReader reader, TermPositions toWrap)
          Create a new wrapper around a TermPositions
 
Method Summary
 void close()
          OTHER DELEGATED METHODS
 int doc()
           
 boolean equals(Object obj)
           
 int freq()
           
 int hashCode()
           
 boolean next()
           
 int nextPosition()
          DELEGATED METHODS THAT PERFORM "WORK"
 int read(int[] docs, int[] freqs)
           
 void seek(Term term)
           
 void seek(TermEnum termEnum)
           
 boolean skipTo(int target)
           
 String toString()
           
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

reader

private LimIndexReader reader

wrapped

private TermPositions wrapped
Constructor Detail

LimTermPositions

public LimTermPositions(LimIndexReader reader,
                        TermPositions toWrap)
Create a new wrapper around a TermPositions

Method Detail

nextPosition

public int nextPosition()
                 throws IOException
DELEGATED METHODS THAT PERFORM "WORK"

Specified by:
nextPosition in interface TermPositions
Throws:
IOException

read

public int read(int[] docs,
                int[] freqs)
         throws IOException
Specified by:
read in interface TermDocs
Throws:
IOException

seek

public void seek(Term term)
          throws IOException
Specified by:
seek in interface TermDocs
Throws:
IOException

seek

public void seek(TermEnum termEnum)
          throws IOException
Specified by:
seek in interface TermDocs
Throws:
IOException

skipTo

public boolean skipTo(int target)
               throws IOException
Specified by:
skipTo in interface TermDocs
Throws:
IOException

close

public void close()
           throws IOException
OTHER DELEGATED METHODS

Specified by:
close in interface TermDocs
Throws:
IOException

doc

public int doc()
Specified by:
doc in interface TermDocs

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

freq

public int freq()
Specified by:
freq in interface TermDocs

hashCode

public int hashCode()
Overrides:
hashCode in class Object

next

public boolean next()
             throws IOException
Specified by:
next in interface TermDocs
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object