KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lucene > search > highlight > WeightedTerm


1 package org.apache.lucene.search.highlight;
2 /**
3  * Copyright 2002-2004 The Apache Software Foundation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  */

17
18 /**
19  * Copyright 2002-2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
20  */

21 public class WeightedTerm
22 {
23     float weight; // multiplier
24
String JavaDoc term; //stemmed form
25
public WeightedTerm (float weight,String JavaDoc term)
26     {
27         this.weight=weight;
28         this.term=term;
29     }
30     
31     
32     /**
33      * @return the term value (stemmed)
34      * @uml.property name="term"
35      */

36     public String JavaDoc getTerm()
37     {
38         return term;
39     }
40
41     /**
42      * @return the weight associated with this term
43      * @uml.property name="weight"
44      */

45     public float getWeight()
46     {
47         return weight;
48     }
49
50     /**
51      * @param term the term value (stemmed)
52      * @uml.property name="term"
53      */

54     public void setTerm(String JavaDoc term)
55     {
56         this.term = term;
57     }
58
59     /**
60      * @param weight the weight associated with this term
61      * @uml.property name="weight"
62      */

63     public void setWeight(float weight)
64     {
65         this.weight = weight;
66     }
67
68 }
69
Popular Tags