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

Variable Index

 o convertTo
what the word should be changed to
 o count
keeps the count of how many occurences of the word happened
 o word
the actual word

Constructor Index

 o WordData()
WordData constructor sets all to null
 o WordData(String)
sets the approriate word and sets the count to 1 Creation date: (30/12/2001 9:10:02 PM)

Method Index

 o addUsage()
increments the count of this word Creation date: (30/12/2001 9:39:56 PM)
 o 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
 o getConvertTo()
returns the convertTo string Creation date: (30/12/2001 10:21:41 PM)
 o getWord()
returns the word used by this storage element Creation date: (01/01/2002 10:17:46 PM)
 o setConvertTo(String)
Insert the method's description here.
 o toString()
prints the value of this word data object Creation date: (30/12/2001 9:48:02 PM)

Variables

 o count
 private int count
keeps the count of how many occurences of the word happened

 o word
 private String word
the actual word

 o convertTo
 private String convertTo
what the word should be changed to

Constructors

 o WordData
 public WordData()
WordData constructor sets all to null

 o 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

Methods

 o addUsage
 public void addUsage()
increments the count of this word Creation date: (30/12/2001 9:39:56 PM)

 o 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
 o getConvertTo
 public String getConvertTo()
returns the convertTo string Creation date: (30/12/2001 10:21:41 PM)

Returns:
java.lang.String
 o 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
 o 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
 o 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