|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.util.iterator.DoubleSafeIterator
public class DoubleSafeIterator
This class symbols an iterator that insures that similar objects are returned only once.
| Constructor Summary | |
|---|---|
DoubleSafeIterator(java.util.Iterator base)
Creates a new DoubleSafeIterator around a given one. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns whether there are any more elements. |
java.lang.Object |
next()
Returns the next element |
void |
remove()
Always throws an UnsupportedOperationException removal is not supported by this iterator. |
protected void |
skipAhead()
Advances internal counter, skipping doublettes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DoubleSafeIterator(java.util.Iterator base)
base - the iterator to wrap| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iteratorpublic java.lang.Object next()
next in interface java.util.Iteratorpublic void remove()
remove in interface java.util.Iteratorprotected void skipAhead()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||