01: package org.apache.lucene.index;
02:
03: /**
04: * Licensed to the Apache Software Foundation (ASF) under one or more
05: * contributor license agreements. See the NOTICE file distributed with
06: * this work for additional information regarding copyright ownership.
07: * The ASF licenses this file to You under the Apache License, Version 2.0
08: * (the "License"); you may not use this file except in compliance with
09: * the License. You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS,
15: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: * See the License for the specific language governing permissions and
17: * limitations under the License.
18: */
19:
20: /** A TermInfo is the record of information stored for a term.*/
21:
22: final class TermInfo {
23: /** The number of documents which contain the term. */
24: int docFreq = 0;
25:
26: long freqPointer = 0;
27: long proxPointer = 0;
28: int skipOffset;
29:
30: TermInfo() {
31: }
32:
33: TermInfo(int df, long fp, long pp) {
34: docFreq = df;
35: freqPointer = fp;
36: proxPointer = pp;
37: }
38:
39: TermInfo(TermInfo ti) {
40: docFreq = ti.docFreq;
41: freqPointer = ti.freqPointer;
42: proxPointer = ti.proxPointer;
43: skipOffset = ti.skipOffset;
44: }
45:
46: final void set(int docFreq, long freqPointer, long proxPointer,
47: int skipOffset) {
48: this .docFreq = docFreq;
49: this .freqPointer = freqPointer;
50: this .proxPointer = proxPointer;
51: this .skipOffset = skipOffset;
52: }
53:
54: final void set(TermInfo ti) {
55: docFreq = ti.docFreq;
56: freqPointer = ti.freqPointer;
57: proxPointer = ti.proxPointer;
58: skipOffset = ti.skipOffset;
59: }
60: }
|