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

Variable Index

 o MAXSINGLELENGTH
the longest length of a string that will have it's own Vector/matrix set
 o wordDataVectors
stores all the words in a sorted fashion

Constructor Index

 o WordDataStorage()
WordDataStorage constructor creates the vectors

Method Index

 o addWord(String)
Inserts a word in the right place (or increments a usage count Creation date: (30/12/2001 9:06:02 PM)
 o convertAll(String)
Insert the method's description here.
 o getConvertTo(String)
gets the string that the original should be converted to Creation date: (30/12/2001 10:17:52 PM)
 o 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)
 o toString()
Insert the method's description here.
 o writeConversionData(BufferedWriter)
writes the conversion data.

Variables

 o MAXSINGLELENGTH
 private static final int MAXSINGLELENGTH
the longest length of a string that will have it's own Vector/matrix set

 o wordDataVectors
 private Vector wordDataVectors[][]
stores all the words in a sorted fashion

Constructors

 o WordDataStorage
 public WordDataStorage()
WordDataStorage constructor creates the vectors

Methods

 o 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
 o 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
 o 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
 o 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
 o 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
 o 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