public class Dictionary
extends java.lang.Object
Constructor and Description |
---|
Dictionary() |
Modifier and Type | Method and Description |
---|---|
void |
add(XT xt)
Add a new Forth word to the current word list.
|
WordList |
getCurrent()
Return the current definition word list.
|
WordList[] |
getSearchOrder()
Return the current search order, list of word lists.
|
XT |
search(java.lang.String name)
Search the dictionary for a given word name, returning the XT
associated with the word name or
null if not found. |
java.lang.String |
search(XT xt)
Search the dictionary for the word name that matches the given
XT behaviour.
|
WordList |
setCurrent(WordList wordlist)
Set the currently active word list to a given word list.
|
void |
setSearchOrder(WordList[] list)
Set the dictionaries search order to a given list of word lists.
|
public void setSearchOrder(WordList[] list)
list
- the list of word lists to be searched.public WordList[] getSearchOrder()
public XT search(java.lang.String name)
null
if not found.
This actually searches the word lists in accordance with the
current search order.name
- The word name to search for.null
if the word could not be found.public java.lang.String search(XT xt)
null
is returned.xt
- the XT of the word to search for.null
if the name could not be found.public WordList setCurrent(WordList wordlist)
wordlist
- The word list to be used for further
definitions.public WordList getCurrent()
public void add(XT xt)
xt
- The XT to associate with the word name.