Class AbstractWordList

    • Constructor Detail

      • AbstractWordList

        public AbstractWordList()
    • Method Detail

      • getComparator

        public Comparator<String> getComparator()
        Description copied from interface: WordList
        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.
        Specified by:
        getComparator in interface WordList
        Returns:
        comparator for words in the list.
      • iterator

        public Iterator<String> iterator()
        Description copied from interface: WordList
        Returns an iterator to traverse this word list from the 0th index.
        Specified by:
        iterator in interface WordList
        Returns:
        iterator for this word list
      • medianIterator

        public Iterator<String> medianIterator()
        Description copied from interface: WordList
        Returns an iterator to traverse this word list by following a recursive sequence of medians.
        Specified by:
        medianIterator in interface WordList
        Returns:
        iterator for this word list
      • checkRange

        protected void checkRange​(int index)
        Throws an IndexOutOfBoundsException if the supplied index is less than 0 or greater than or equal to the size of this word list.
        Parameters:
        index - to check
      • checkIsString

        @Deprecated
        protected void checkIsString​(Object o)
        Deprecated.
        this method is no longer used and will be removed in a future release
        Throws a ClassCastException if the supplied object is not an instance of String.
        Parameters:
        o - object to check