TextDatabase
Class Keyword

java.lang.Object
  extended by TextDatabase.Keyword
All Implemented Interfaces:
java.lang.Comparable, java.util.Comparator

public class Keyword
extends java.lang.Object
implements java.lang.Comparable, java.util.Comparator

A Keyword has a name and a frequency


Constructor Summary
Keyword(java.lang.String KeywordName)
          Initializes a the Keyword and sets it's name
Keyword(java.lang.String KeywordName, int Frequency)
          Initializes the Keyword and sets it's name and frequency
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares one keyword with another
 int compareTo(java.lang.Object obj)
          Compares the keyword to another object
 boolean equals(java.lang.Object obj)
          Checks the equality of the keyword with an object
 int getFrequency()
          Gets the keyword frequency
 java.lang.String getKeywordName()
          Gets the keyword's name
 void setFrequency(int Frequency)
          Sets the keyword's frequency
 void setKeywordName(java.lang.String KeywordName)
          Sets the keyword's name
 java.lang.String toString()
          Gets the keyword's name
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Keyword

public Keyword(java.lang.String KeywordName)
Initializes a the Keyword and sets it's name


Keyword

public Keyword(java.lang.String KeywordName,
               int Frequency)
Initializes the Keyword and sets it's name and frequency

Method Detail

setKeywordName

public void setKeywordName(java.lang.String KeywordName)
Sets the keyword's name


setFrequency

public void setFrequency(int Frequency)
Sets the keyword's frequency


getKeywordName

public java.lang.String getKeywordName()
Gets the keyword's name


getFrequency

public int getFrequency()
Gets the keyword frequency


equals

public boolean equals(java.lang.Object obj)
Checks the equality of the keyword with an object

Specified by:
equals in interface java.util.Comparator
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(java.lang.Object obj)
Compares the keyword to another object

Specified by:
compareTo in interface java.lang.Comparable

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares one keyword with another

Specified by:
compare in interface java.util.Comparator

toString

public java.lang.String toString()
Gets the keyword's name

Overrides:
toString in class java.lang.Object