|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.util.iterator.ConcatenatedIterator<T>
public class ConcatenatedIterator<T>
An iterator that represents the concatenation of two individual iterators. The concatenated iterator will range over the elements of the first iterator, followed by the elements of the second.
Constructor Summary | |
---|---|
ConcatenatedIterator(java.util.Iterator<? extends T> iter0,
java.util.Iterator<? extends T> iter1)
Construct an iterator that is the concatenation of the two given iterators. |
Method Summary | ||
---|---|---|
boolean |
hasDefaultValue()
Answer true if this iteration has a default value. |
|
boolean |
hasNext()
Returns true if the iteration has more elements. |
|
T |
next()
Returns the next element in the interation. |
|
void |
remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). |
|
|
setDefaultValue(X defaultValue)
Set the default value for this iteration, which will be a value that is guaranteed to be returned as a member of the iteration. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConcatenatedIterator(java.util.Iterator<? extends T> iter0, java.util.Iterator<? extends T> iter1)
iter0
- The first iterator. Elements of this iterator will appear
first in the elements read from the concatenation.iter1
- The second iterator. Elements of this iterator will appear
second in the elements read from the concatenation.Method Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator<T>
public T next()
next
in interface java.util.Iterator<T>
java.util.NoSuchElementException
- - iteration has no more elements.public void remove()
remove
in interface java.util.Iterator<T>
java.lang.UnsupportedOperationException
- - if the remove operation is not
supported by this Iterator.
java.lang.IllegalStateException
- - if the next method has not yet been
called, or the remove method has already been called after the
last call to the next method.public <X extends T> void setDefaultValue(X defaultValue)
next()
.
defaultValue
- The default value for the iteration, or null for
there to be no default value. The default default
value is null.public boolean hasDefaultValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |