Package org.passay.dictionary
Interface WordList
- All Known Implementing Classes:
AbstractFileWordList,AbstractWordList,ArrayWordList,FileWordList,MemoryMappedFileWordList
public interface WordList
Represents a random-access list of words.
-
Method Summary
Modifier and TypeMethodDescriptionget(int index) Returns the word at the given 0-based index.Returns the comparator that should be used to compare a search term with candidate words in the list.iterator()Returns an iterator to traverse this word list from the 0th index.Returns an iterator to traverse this word list by following a recursive sequence of medians.intsize()Returns the number of words in the list.
-
Method Details
-
getComparator
Comparator<CharSequence> getComparator()Returns the comparator that should be used to compare a search term with candidate words in the list. The comparator naturally respects ordering and case sensitivity of the word list.- Returns:
- comparator for words in the list.
-
get
Returns the word at the given 0-based index.- Parameters:
index- 0-based index.- Returns:
- word at given index.
-
iterator
Returns an iterator to traverse this word list from the 0th index.- Returns:
- iterator for this word list
-
medianIterator
Returns an iterator to traverse this word list by following a recursive sequence of medians.- Returns:
- iterator for this word list
-
size
int size()Returns the number of words in the list.- Returns:
- total number of words in list.
-