RapidSpell Desktop


com.keyoti.rapidSpell
Class UserDictionary

java.lang.Object
  |
  +--com.keyoti.rapidSpell.UserDictionary

public class UserDictionary
extends java.lang.Object

Represents the UserDictionary


Field Summary
 java.io.File dictFile
          The file containing the dictionary
 
Constructor Summary
UserDictionary()
           
UserDictionary(java.io.File userDictionaryFile)
          Construct a UserDictionary based on the userDictionaryFile, which does not have to exist.
UserDictionary(java.io.File userDictionaryFile, int wordLimit)
          Construct a UserDictionary based on the userDictionaryFile, which does not have to exist.
 
Method Summary
 boolean addWord(java.lang.String word)
          Tries to add word to this dictionary
 boolean isValid()
          Returns if the dictionary file is valid.
 int readAll(java.util.ArrayList list)
          Read the dictionary word list into list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dictFile

public java.io.File dictFile
The file containing the dictionary
Constructor Detail

UserDictionary

public UserDictionary(java.io.File userDictionaryFile)
Construct a UserDictionary based on the userDictionaryFile, which does not have to exist.

User dictionary is limited to 5,000 words

Parameters:
userDictionaryFile - the file used for a user dictionary.

UserDictionary

public UserDictionary()

UserDictionary

public UserDictionary(java.io.File userDictionaryFile,
                      int wordLimit)
Construct a UserDictionary based on the userDictionaryFile, which does not have to exist.
Parameters:
listSize - number of words user dictionary is limited to (13,000 max). If wordLimit is <=0 it will be set to 13,000.
userDictionaryFile - the file used for a user dictionary.
Method Detail

isValid

public boolean isValid()
Returns if the dictionary file is valid.

addWord

public boolean addWord(java.lang.String word)
Tries to add word to this dictionary
Parameters:
word - String containing the new word
Returns:
true if added successfully, false otherwise.

readAll

public int readAll(java.util.ArrayList list)
Read the dictionary word list into list
Parameters:
list - the String array that the word list will be read into.
Returns:
number of words in list.

RapidSpell Desktop


Copyright © 2002-2005 Keyoti Inc. All Rights Reserved.