|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mit.jwi.RAMDictionary.HotSwappableIterator<E>
E - the element type of the iteratorprotected abstract class RAMDictionary.HotSwappableIterator<E>
An iterator that allows the dictionary to be loaded into memory while it is iterating.
| Constructor Summary | |
|---|---|
RAMDictionary.HotSwappableIterator(java.util.Iterator<E> itr,
boolean checkForLoad)
Constructs a new hot swappable iterator. |
|
| Method Summary | |
|---|---|
protected void |
checkForLoad()
Checks to see if the data has been loaded into memory; is so, replaces the original iterator with one that iterates over the in-memory data structures. |
boolean |
hasNext()
|
protected abstract java.util.Iterator<E> |
makeIterator()
Constructs the iterator that will iterate over the loaded data. |
E |
next()
|
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RAMDictionary.HotSwappableIterator(java.util.Iterator<E> itr,
boolean checkForLoad)
itr - the wrapped iteratorcheckForLoad - if true, on each call the iterator checks to
see if the dictionary has been loaded into memory,
switching data sources if so
java.lang.NullPointerException - if the specified iterator is null| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iterator<E>public E next()
next in interface java.util.Iterator<E>protected void checkForLoad()
protected abstract java.util.Iterator<E> makeIterator()
public void remove()
remove in interface java.util.Iterator<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||