public class Dictionary
extends java.lang.Object
An organized collection of words, optimized for searching them. This class is a singleton, meaning that there is, at most, a single instance of this class per application.
This dictionary uses a collection of Portuguese words loaded as a resource
from a file in this package. It is backed by a Trie
to index words
and speedup searches.
Modifier and Type | Method and Description |
---|---|
static Dictionary |
getInstance()
Obtain the sole instance of this class.
|
java.lang.String |
getRandomLargeWord()
Return a large random word from the trie
|
Trie.Search |
startSearch()
Start a dictionary search.
|
public static Dictionary getInstance()
public Trie.Search startSearch()
public java.lang.String getRandomLargeWord()