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 Type
    Method
    Description
    get(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.
    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.
    int
    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

      String get(int index)
      Returns the word at the given 0-based index.
      Parameters:
      index - 0-based index.
      Returns:
      word at given index.
    • iterator

      Iterator<String> iterator()
      Returns an iterator to traverse this word list from the 0th index.
      Returns:
      iterator for this word list
    • medianIterator

      Iterator<String> 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.