edu.cmu.cs.coral.icf.plan_based.planners.pip
Class ConcatenatedIterator

java.lang.Object
  |
  +--edu.cmu.cs.coral.icf.plan_based.planners.pip.ConcatenatedIterator

public class ConcatenatedIterator
extends java.lang.Object
implements java.util.Iterator

Represents an iterator that concatenates several other iterators together.

Since:
ICF 0.0
Version:
$Id$

Field Summary
private  java.util.Iterator curIterator
           
private  java.util.Iterator iterators
           
 
Constructor Summary
ConcatenatedIterator(java.util.Iterator iterators)
          Construct a new iterator that strings together the iterators specified.
 
Method Summary
 boolean hasNext()
          Checks if there is a next element from this iterator.
 java.lang.Object next()
          Gets the next element from this iterator.
 void remove()
          Removes this element from the iterator's backing store.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

curIterator

private java.util.Iterator curIterator

iterators

private java.util.Iterator iterators
Constructor Detail

ConcatenatedIterator

public ConcatenatedIterator(java.util.Iterator iterators)
Construct a new iterator that strings together the iterators specified.
Parameters:
iterators - an iterator over iterators to string together
Since:
ICF 0.0
Method Detail

hasNext

public boolean hasNext()
Checks if there is a next element from this iterator.
Specified by:
hasNext in interface java.util.Iterator
Returns:
true if and only if this iterator has another element
Since:
ICF 0.0

next

public java.lang.Object next()
Gets the next element from this iterator.
Specified by:
next in interface java.util.Iterator
Returns:
the next element of this iterator
Since:
ICF 0.0

remove

public void remove()
Removes this element from the iterator's backing store.
Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException - always
Since:
ICF 0.0