Clover Coverage Report
Coverage timestamp: Fri May 9 2008 10:54:27 EST
../../../../img/srcFileCovDistChart3.png 83% of files have more coverage
41   145   40   1.02
0   80   0.98   10
40     1  
4    
 
  FilterIndexReader       Line # 35 25 24 10.2% 0.10204082
  FilterIndexReader.FilterTermDocs       Line # 38 9 9 33.3% 0.33333334
  FilterIndexReader.FilterTermPositions       Line # 56 2 2 50% 0.5
  FilterIndexReader.FilterTermEnum       Line # 67 5 5 60% 0.6
 
  (1)
 
1    package org.apache.lucene.index;
2   
3    /**
4    * Copyright 2004 The Apache Software Foundation
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10    * http://www.apache.org/licenses/LICENSE-2.0
11    *
12    * Unless required by applicable law or agreed to in writing, software
13    * distributed under the License is distributed on an "AS IS" BASIS,
14    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    * See the License for the specific language governing permissions and
16    * limitations under the License.
17    */
18   
19    import org.apache.lucene.document.Document;
20    import org.apache.lucene.document.FieldSelector;
21   
22   
23    import java.io.IOException;
24    import java.util.Collection;
25   
26    /** A <code>FilterIndexReader</code> contains another IndexReader, which it
27    * uses as its basic source of data, possibly transforming the data along the
28    * way or providing additional functionality. The class
29    * <code>FilterIndexReader</code> itself simply implements all abstract methods
30    * of <code>IndexReader</code> with versions that pass all requests to the
31    * contained index reader. Subclasses of <code>FilterIndexReader</code> may
32    * further override some of these methods and may also provide additional
33    * methods and fields.
34    */
 
35    public class FilterIndexReader extends IndexReader {
36   
37    /** Base class for filtering {@link TermDocs} implementations. */
 
38    public static class FilterTermDocs implements TermDocs {
39    protected TermDocs in;
40   
 
41  1 toggle public FilterTermDocs(TermDocs in) { this.in = in; }
42   
 
43  1 toggle public void seek(Term term) throws IOException { in.seek(term); }
 
44  0 toggle public void seek(TermEnum termEnum) throws IOException { in.seek(termEnum); }
 
45  1 toggle public int doc() { return in.doc(); }
 
46  0 toggle public int freq() { return in.freq(); }
 
47  0 toggle public boolean next() throws IOException { return in.next(); }
 
48  0 toggle public int read(int[] docs, int[] freqs) throws IOException {
49  0 return in.read(docs, freqs);
50    }
 
51  0 toggle public boolean skipTo(int i) throws IOException { return in.skipTo(i); }
 
52  0 toggle public void close() throws IOException { in.close(); }
53    }
54   
55    /** Base class for filtering {@link TermPositions} implementations. */
 
56    public static class FilterTermPositions
57    extends FilterTermDocs implements TermPositions {
58   
 
59  1 toggle public FilterTermPositions(TermPositions in) { super(in); }
60   
 
61  0 toggle public int nextPosition() throws IOException {
62