lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Shengli...@cis.strath.ac.uk>
Subject class definition used in Lucene
Date Fri, 05 Dec 2003 15:22:22 GMT

hi, 

I have problems for understanding some classes definitions in Lucene
(see the end of this e-mail for the source code).

A class "FilterIndexReader" is defined at 1. 
Then "FilterTermDocs" is defined as a nested static class at 2.
 
At 3, 

public FilterTermDocs(TermDocs in) 

is a constructor. What I am not understand are as follows: 

1. Now that FilterTermDocs is a static class, then why it has a constructor 
at 3?

2. Why we can use (TermDocs in) for the constructor at 3? Here "TermDocs" is 
an interface, does that mean "in" is an object of "TermDocs"?
Thanks in advance for your help!

Best,

Shengli


1 public class FilterIndexReader extends IndexReader {

  /** Base class for filtering {@link TermDocs} implementations. */
2  public static class FilterTermDocs implements TermDocs {3    protected
   TermDocs in;

3  public FilterTermDocs(TermDocs in) { this.in = in; }
...............




---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message