pylucene 3.5.0-3
[pylucene.git] / lucene-java-3.5.0 / lucene / contrib / instantiated / src / java / org / apache / lucene / store / instantiated / FieldSetting.java
1 package org.apache.lucene.store.instantiated;
2
3 import java.io.Serializable;
4
5 /**
6  * Licensed to the Apache Software Foundation (ASF) under one or more
7  * contributor license agreements.  See the NOTICE file distributed with
8  * this work for additional information regarding copyright ownership.
9  * The ASF licenses this file to You under the Apache License, Version 2.0
10  * (the "License"); you may not use this file except in compliance with
11  * the License.  You may obtain a copy of the License at
12  *
13  *     http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21
22 /**
23  * For non package access see {@link org.apache.lucene.index.IndexReader#getFieldNames(org.apache.lucene.index.IndexReader.FieldOption)} 
24  */
25 class FieldSetting implements Serializable {
26   String fieldName;
27
28   boolean storeTermVector = false;
29   boolean storeOffsetWithTermVector = false;
30   boolean storePositionWithTermVector = false;
31   boolean storePayloads = false;
32
33   boolean stored = false;
34   boolean indexed = false;
35   boolean tokenized = false;
36
37   FieldSetting() {
38   }
39
40
41   FieldSetting(String fieldName) {
42     this.fieldName = fieldName;
43   }
44
45   @Override
46   public boolean equals(Object o) {
47     if (this == o)
48       return true;
49     if (o == null || getClass() != o.getClass())
50       return false;
51
52     final FieldSetting that = (FieldSetting) o;
53
54     return fieldName.equals(that.fieldName);
55
56   }
57
58   @Override
59   public int hashCode() {
60     return fieldName.hashCode();
61   }
62
63
64 }