2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 using System.Collections.Generic;
22 namespace Mono.Lucene.Net.Index
25 /// Base class for enumerating all but deleted docs.
27 /// <p/>NOTE: this class is meant only to be used internally
28 /// by Lucene; it's only public so it can be shared across
29 /// packages. This means the API is freely subject to
30 /// change, and, the class could be removed entirely, in any
31 /// Lucene release. Use directly at your own risk! */
33 public abstract class AbstractAllTermDocs : TermDocs
36 protected int doc = -1;
38 protected AbstractAllTermDocs(int maxDoc)
43 public void Seek(Term term)
51 throw new NotSupportedException();
55 public void Seek(TermEnum termEnum)
57 throw new NotSupportedException();
72 return SkipTo(doc + 1);
75 public int Read(int[] docs, int[] freqs)
77 int length = docs.Length;
79 while (i < length && doc < maxDoc)
92 public bool SkipTo(int target)
110 public abstract bool IsDeleted(int doc);