jdsl.graph.ref
Class AbstractGraph.OO_to_O_MergerIterator

java.lang.Object
  |
  +--jdsl.graph.ref.AbstractGraph.OO_to_O_MergerIterator
All Implemented Interfaces:
ObjectIterator
Enclosing class:
AbstractGraph

protected static class AbstractGraph.OO_to_O_MergerIterator
extends java.lang.Object
implements ObjectIterator


Constructor Summary
AbstractGraph.OO_to_O_MergerIterator(ObjectIterator o1, ObjectIterator o2)
          Assumes neither iterator is null
 
Method Summary
 boolean hasNext()
           
 java.lang.Object nextObject()
           
 java.lang.Object object()
           
 void reset()
          Puts the iterator back in its initial, before-the-first state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGraph.OO_to_O_MergerIterator

public AbstractGraph.OO_to_O_MergerIterator(ObjectIterator o1,
                                            ObjectIterator o2)
Assumes neither iterator is null
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface ObjectIterator
Following copied from interface: jdsl.core.api.ObjectIterator
Returns:
Whether there is at least one object still unseen

nextObject

public java.lang.Object nextObject()
Specified by:
nextObject in interface ObjectIterator
Following copied from interface: jdsl.core.api.ObjectIterator
Returns:
Next object to consider
Throws:
java.util.NoSuchElementException - if iterator has moved past the last object

object

public java.lang.Object object()
Specified by:
object in interface ObjectIterator
Following copied from interface: jdsl.core.api.ObjectIterator
Returns:
The object returned by the most recent next()
Throws:
java.util.NoSuchElementException - When the iterator is in its initial, before-the-first-object state

reset

public void reset()
Description copied from interface: ObjectIterator
Puts the iterator back in its initial, before-the-first state
Specified by:
reset in interface ObjectIterator