All Packages Class Hierarchy This Package Previous Next Index
Class bradel.wordchanger.WordDataStorage
java.lang.Object
|
+----bradel.wordchanger.WordDataStorage
- public class WordDataStorage
- extends Object
Stores a set of words and the data associated with them
in a three dimensional structure (for speed and
statistical purposes)
Creation date: (30/12/2001 2:37:27 PM)
- Author:
- : Borys Bradel
Copyright (c) 2001 Borys Bradel
All rights reserved
-
MAXSINGLELENGTH
- the longest length of a string that will have it's own Vector/matrix set
-
wordDataVectors
- stores all the words in a sorted fashion
-
WordDataStorage()
- WordDataStorage constructor creates the vectors
-
addWord(String)
- Inserts a word in the right place (or increments a usage count
Creation date: (30/12/2001 9:06:02 PM)
-
convertAll(String)
- Insert the method's description here.
-
getConvertTo(String)
- gets the string that the original should be converted to
Creation date: (30/12/2001 10:17:52 PM)
-
reverseConvertTo(BufferedReader, String)
- perform a reverse conversino
take the buffer, and get the two string
arrays out of it (as vectors)
uses the Vectors
to identify what has to be replaced
If something cannot be replaced then it
is left alone
Creation date: (01/01/2002 10:41:01 PM)
-
toString()
- Insert the method's description here.
-
writeConversionData(BufferedWriter)
- writes the conversion data.
MAXSINGLELENGTH
private static final int MAXSINGLELENGTH
- the longest length of a string that will have it's own Vector/matrix set
wordDataVectors
private Vector wordDataVectors[][]
- stores all the words in a sorted fashion
WordDataStorage
public WordDataStorage()
- WordDataStorage constructor creates the vectors
addWord
public boolean addWord(String word)
- Inserts a word in the right place (or increments a usage count
Creation date: (30/12/2001 9:06:02 PM)
- Parameters:
- word - java.lang.String
- Returns:
- boolean
convertAll
public void convertAll(String prefix)
- Insert the method's description here.
Creation date: (30/12/2001 10:08:59 PM)
- Parameters:
- prefix - java.lang.String
getConvertTo
public String getConvertTo(String original)
- gets the string that the original should be converted to
Creation date: (30/12/2001 10:17:52 PM)
- Parameters:
- orginal - java.lang.String
- Returns:
- java.lang.String
reverseConvertTo
public void reverseConvertTo(BufferedReader conversionData,
String prefix)
- perform a reverse conversino
take the buffer, and get the two string
arrays out of it (as vectors)
uses the Vectors
to identify what has to be replaced
If something cannot be replaced then it
is left alone
Creation date: (01/01/2002 10:41:01 PM)
- Parameters:
- conversionData - java.io.BufferedReader
- prefix - String
toString
public String toString()
- Insert the method's description here.
Creation date: (30/12/2001 9:47:42 PM)
- Returns:
- java.lang.String
- Overrides:
- toString in class Object
writeConversionData
public void writeConversionData(BufferedWriter outWriter)
- writes the conversion data. Each word
is written on a separate line.
the first token of the line is the original
and the second token is what is to be converted
to.
Creation date: (01/01/2002 10:12:50 PM)
- Parameters:
- outWriter - java.io.BufferedWriter
All Packages Class Hierarchy This Package Previous Next Index