Interface ILexicon

All Known Implementing Classes:
SimpleLexicon

public interface ILexicon


Method Summary
 java.util.Iterator<java.lang.String> iterator()
          Return an iterator over all words stored in the lexicon.
 void load(java.util.Scanner s)
          Clear a lexicon and store all values read from the scanner for subsequent querying.
 int size()
          Returns number of words stored in the lexicon (as from last call to load, for example).
 LexStatus wordStatus(java.lang.String s)
          Returns value specifying whether is is in the lexicon: WORD, is the prefix of a word in the lexicon: PREFIX, or is not a prefix and not a word: NOT_WORD.
 

Method Detail

load

void load(java.util.Scanner s)
Clear a lexicon and store all values read from the scanner for subsequent querying.

Parameters:
s - is the source of words for the lexicon

wordStatus

LexStatus wordStatus(java.lang.String s)
Returns value specifying whether is is in the lexicon: WORD, is the prefix of a word in the lexicon: PREFIX, or is not a prefix and not a word: NOT_WORD. See LexStatus

Parameters:
s - is string queried
Returns:
status of s as to how it appears in lexicon

iterator

java.util.Iterator<java.lang.String> iterator()
Return an iterator over all words stored in the lexicon.

Returns:
an iterator over the words in the lexicon

size

int size()
Returns number of words stored in the lexicon (as from last call to load, for example).

Returns:
number of words in the lexicon