All Packages Class Hierarchy This Package Previous Next Index
Class bradel.wordchanger.WordData
java.lang.Object
|
+----bradel.wordchanger.ComparisonObject
|
+----bradel.wordchanger.WordData
- public class WordData
- extends ComparisonObject
Contains the data for a single word entry
Creation date: (30/12/2001 9:01:13 PM)
- Author:
- : Borys Bradel
Copyright (c) 2001 Borys Bradel
All rights reserved
-
convertTo
- what the word should be changed to
-
count
- keeps the count of how many occurences of the word happened
-
word
- the actual word
-
WordData()
- WordData constructor sets all to null
-
WordData(String)
- sets the approriate word and sets the count to 1
Creation date: (30/12/2001 9:10:02 PM)
-
addUsage()
- increments the count of this word
Creation date: (30/12/2001 9:39:56 PM)
-
compareTo(ComparisonObject)
- compareTo method, just check the word value as two strings
if the parameter is null, this is bigger (return 1)
if the parameter is not htis object, this is smaller (return -1)
if the passed in parameter is not a WordData object
print an error
-
getConvertTo()
- returns the convertTo string
Creation date: (30/12/2001 10:21:41 PM)
-
getWord()
- returns the word used by this storage element
Creation date: (01/01/2002 10:17:46 PM)
-
setConvertTo(String)
- Insert the method's description here.
-
toString()
- prints the value of this word data object
Creation date: (30/12/2001 9:48:02 PM)
count
private int count
- keeps the count of how many occurences of the word happened
word
private String word
- the actual word
convertTo
private String convertTo
- what the word should be changed to
WordData
public WordData()
- WordData constructor sets all to null
WordData
public WordData(String word)
- sets the approriate word and sets the count to 1
Creation date: (30/12/2001 9:10:02 PM)
- Parameters:
- word - java.lang.String
addUsage
public void addUsage()
- increments the count of this word
Creation date: (30/12/2001 9:39:56 PM)
compareTo
public int compareTo(ComparisonObject anotherComparisonObject)
- compareTo method, just check the word value as two strings
if the parameter is null, this is bigger (return 1)
if the parameter is not htis object, this is smaller (return -1)
if the passed in parameter is not a WordData object
print an error
- Overrides:
- compareTo in class ComparisonObject
getConvertTo
public String getConvertTo()
- returns the convertTo string
Creation date: (30/12/2001 10:21:41 PM)
- Returns:
- java.lang.String
getWord
public String getWord()
- returns the word used by this storage element
Creation date: (01/01/2002 10:17:46 PM)
- Returns:
- java.lang.String
setConvertTo
public void setConvertTo(String convertTo)
- Insert the method's description here.
Creation date: (30/12/2001 10:15:21 PM)
- Parameters:
- convertTo - java.lang.String
toString
public String toString()
- prints the value of this word data object
Creation date: (30/12/2001 9:48:02 PM)
- Returns:
- java.lang.String
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index