|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectiterator.AbstractIterator
public abstract class AbstractIterator
Abstract class to implement some methods of the Iterable interface.
Provides a protected printDiagnostics() method that can be extended
to output diagnostic messages at each iteration when the verbose flag
is set.
| Field Summary | |
|---|---|
protected java.lang.String |
diagnosticString
|
protected int |
iter
|
| Constructor Summary | |
|---|---|
AbstractIterator()
|
|
| Method Summary | |
|---|---|
boolean |
isVerbose()
Returns true if the verbose flag is set. |
void |
iterate()
Iterates until termination. |
protected void |
printDiagnostics()
Prints diagnostic output. |
void |
setVerbose(boolean verbose)
Sets the verbosity of this iterator. |
protected abstract void |
updateDiagnostics()
Provides access to the diagnosticString, so that the user has
flexibility over multiple methods accessing this string at different times. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface iterator.Iterable |
|---|
init, isTerminated, singleIteration |
| Field Detail |
|---|
protected java.lang.String diagnosticString
protected int iter
| Constructor Detail |
|---|
public AbstractIterator()
| Method Detail |
|---|
public boolean isVerbose()
true if the verbose flag is set.
public void iterate()
Iterable
iterate in interface Iterablepublic void setVerbose(boolean verbose)
verbose - use true if the iterator is to be verbose.protected void printDiagnostics()
protected abstract void updateDiagnostics()
diagnosticString, so that the user has
flexibility over multiple methods accessing this string at different times.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||