|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.dictionary.AbstractWordList
public abstract class AbstractWordList
Provides common operations implementations for word lists.
| Field Summary | |
|---|---|
protected java.util.Comparator<java.lang.String> |
comparator
Word comparator. |
| Constructor Summary | |
|---|---|
AbstractWordList()
|
|
| Method Summary | |
|---|---|
protected void |
checkIsString(java.lang.Object o)
Throws a ClassCastException if the supplied object is not an
instance of String. |
protected void |
checkRange(int index)
Throws a IndexOutOfBoundsException if the supplied index is
less than 0 or greater than or equal to the size of this word list. |
java.util.Comparator<java.lang.String> |
getComparator()
Gets the comparator that should be used to compare a search term with candidate words in the list. |
java.util.Iterator<java.lang.String> |
iterator()
Gets an iterator to traverse this word list from the 0th index. |
java.util.Iterator<java.lang.String> |
medianIterator()
Gets an iterator to traverse this word list from the median. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.vt.middleware.dictionary.WordList |
|---|
get, size |
| Field Detail |
|---|
protected java.util.Comparator<java.lang.String> comparator
| Constructor Detail |
|---|
public AbstractWordList()
| Method Detail |
|---|
public java.util.Comparator<java.lang.String> getComparator()
getComparator in interface WordListpublic java.util.Iterator<java.lang.String> iterator()
iterator in interface WordListpublic java.util.Iterator<java.lang.String> medianIterator()
medianIterator in interface WordListprotected 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 - intprotected void checkIsString(java.lang.Object o)
ClassCastException if the supplied object is not an
instance of String.
o - Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||