public class UserDictionary
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.io.File |
dictFile
The file containing the dictionary
|
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
boolean |
addWord(java.lang.String word)
Tries to add
word to this dictionary |
java.lang.String |
getEncoding()
Gets the encoding to use
|
boolean |
isValid()
Returns if the dictionary file is valid.
|
int |
readAll(java.util.ArrayList list)
Read the dictionary word list into
list |
boolean |
removeWord(java.lang.String word)
Tries to remove
word to this dictionary |
void |
setEncoding(java.lang.String v)
Sets the encoding to use
|
public UserDictionary(java.io.File userDictionaryFile)
userDictionaryFile
, which does not have to exist.
User dictionary is limited to 5,000 words
userDictionaryFile
- the file used for a user dictionary.public UserDictionary()
public UserDictionary(java.io.File userDictionaryFile, int wordLimit)
userDictionaryFile
, which does not have to exist.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.public java.lang.String getEncoding()
public void setEncoding(java.lang.String v)
public boolean isValid()
public boolean addWord(java.lang.String word)
word
to this dictionaryword
- String containing the new wordpublic boolean removeWord(java.lang.String word)
word
to this dictionaryword
- String containing the new wordpublic int readAll(java.util.ArrayList list)
list
list
- the String array that the word list will be read into.Copyright © 2002-2016 Keyoti Inc. All Rights Reserved.