org.xshare.base.iterator
Class GlueingIterator
java.lang.Object
|
+--org.xshare.base.iterator.GlueingIterator
- All Implemented Interfaces:
- java.util.Iterator
- public class GlueingIterator
- extends java.lang.Object
- implements java.util.Iterator
- Version:
- $Revision: 1.3 $
- Author:
- Oliver Fischer
Method Summary |
void |
addIterator(java.util.Iterator pIterator)
|
boolean |
hasNext()
|
boolean |
isRunning()
Checks if the iterator is in use or not. |
java.lang.Object |
next()
|
void |
remove()
This method is not supported since this iterator is only a
wrapper for a bunch of other iterators. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GlueingIterator
public GlueingIterator(java.util.Iterator pIter1,
java.util.Iterator pIter2)
GlueingIterator
public GlueingIterator(java.util.Iterator[] pIters)
isRunning
public boolean isRunning()
- Checks if the iterator is in use or not. Being in use means
for this iterator, that someone has called
next()
or hasNext()
.
- Returns:
- a
boolean
value which is true
if the iterator is running. Otherwise false
is
returned.
addIterator
public void addIterator(java.util.Iterator pIterator)
- Throws:
java.lang.IllegalStateException
- if isRunning()
returns
true
.
remove
public void remove()
- This method is not supported since this iterator is only a
wrapper for a bunch of other iterators.
- Specified by:
remove
in interface java.util.Iterator
- Throws:
java.lang.UnsupportedOperationException
- if this method is called.
next
public java.lang.Object next()
- Specified by:
next
in interface java.util.Iterator
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator
jKiska Base 0.10 [http://jkiska.sourceforge.net]