public abstract class AbstractWordList extends Object implements WordList
Modifier and Type | Field and Description |
---|---|
protected Comparator<String> |
comparator
Word comparator.
|
Constructor and Description |
---|
AbstractWordList() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkIsString(Object o)
Deprecated.
this method is no longer used and will be removed in a future release
|
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. |
Comparator<String> |
getComparator()
Returns the comparator that should be used to compare a search term with candidate words in the list.
|
Iterator<String> |
iterator()
Returns an iterator to traverse this word list from the 0th index.
|
Iterator<String> |
medianIterator()
Returns an iterator to traverse this word list by following a recursive sequence of medians.
|
protected Comparator<String> comparator
public Comparator<String> getComparator()
WordList
getComparator
in interface WordList
public Iterator<String> iterator()
WordList
public Iterator<String> medianIterator()
WordList
medianIterator
in interface WordList
protected void checkRange(int index)
IndexOutOfBoundsException
if the supplied index is less than 0 or greater than or equal to the
size of this word list.index
- to check@Deprecated protected void checkIsString(Object o)
ClassCastException
if the supplied object is not an instance of String
.o
- object to checkCopyright © 2003-2024 Virginia Tech. All Rights Reserved.