lucene-java-user mailing list archives

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


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!



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) { = in; }

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message