KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > contineo > core > text > analyze > Entry


1 /*
2  * Entry.java
3  *
4  * Created on 23. Juli 2003, 22:09
5  */

6
7 package org.contineo.core.text.analyze;
8
9 /**
10  * This class encapsulates an entry consists of a top word and the quantity of this top word in the text.
11  * @author Michael Scholz
12  * @version 1.0
13  */

14 public class Entry {
15
16     /**
17      * @uml.property name="word"
18      */

19     private String JavaDoc word = "";
20     private String JavaDoc originWord = "";
21     /**
22      * @uml.property name="number"
23      */

24     private int number = 0;
25     
26     /**
27      * Creates a new instance of Entry.
28      */

29     public Entry() {
30     }
31     
32     /**
33      * Creates a new instance of Entry.
34      * @param wd - Found top word.
35      * @param nb - Quantity of the top word in the text.
36      */

37     public Entry(String JavaDoc wd, int nb) {
38         word = wd;
39         number = nb;
40     }
41
42     /**
43      * Returns the top word.
44      *
45      * @uml.property name="word"
46      */

47     public String JavaDoc getWord() {
48         return word;
49     }
50
51     /**
52      * Returns the quantity of the top word in the text.
53      *
54      * @uml.property name="number"
55      */

56     public int getNumber() {
57         return number;
58     }
59
60     /**
61      * Sets the top word.
62      *
63      * @uml.property name="word"
64      */

65     public void setWord(String JavaDoc wd) {
66         word = wd;
67     }
68
69     /**
70      * Sets the quantity of the top word.
71      *
72      * @uml.property name="number"
73      */

74     public void setNumber(int nb) {
75         number = nb;
76     }
77
78     /**
79      * @return Returns the originWord.
80      * @uml.property name="originWord"
81      */

82     public String JavaDoc getOriginWord() {
83         return originWord;
84     }
85     
86     /**
87      * @param originWord The originWord to set.
88      * @uml.property name="originWord"
89      */

90     public void setOriginWord(String JavaDoc originWord) {
91         this.originWord = originWord;
92     }
93 }
94
Popular Tags