wt.fc.collections
Class IteratorUtility.AbstractQueryKeyIterator

java.lang.Object
  extended bywt.fc.collections.IteratorUtility.AbstractQueryKeyIterator
All Implemented Interfaces:
Iterator
Direct Known Subclasses:
ReferenceMap.QueryKeyIterator
Enclosing class:
IteratorUtility

abstract static class IteratorUtility.AbstractQueryKeyIterator
extends Object
implements Iterator

Iterates over a List of references, returning each reference's query key. If the reference doesn't have a query key, it is skipped. Subclasses define how the references are stored, what actions to take upon remove, and how to store the modcount

Subclasses should call peek() from their constructor once their references have been initialized.


Field Summary
(package private)  int cursor
           
(package private)  int expectedModCount
           
(package private)  int last
           
 
Constructor Summary
(package private) IteratorUtility.AbstractQueryKeyIterator(int start)
           
 
Method Summary
(package private) abstract  int getModCount()
           
(package private) abstract  List getReferences()
           
 boolean hasNext()
           
 Object next()
           
(package private)  WTReference nextReference()
           
(package private)  void peek()
           
 void remove()
           
(package private) abstract  void removeReference(WTReference r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

last

int last

cursor

int cursor

expectedModCount

int expectedModCount
Constructor Detail

IteratorUtility.AbstractQueryKeyIterator

IteratorUtility.AbstractQueryKeyIterator(int start)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

nextReference

WTReference nextReference()

remove

public void remove()
Specified by:
remove in interface Iterator

peek

void peek()

getReferences

abstract List getReferences()

getModCount

abstract int getModCount()

removeReference

abstract void removeReference(WTReference r)