org.modeshape.jcr.cache.document
Class UnionIterator<Type>
java.lang.Object
org.modeshape.jcr.cache.document.UnionIterator<Type>
- Type Parameters:
Type
- the value type of the iterator
- All Implemented Interfaces:
- Iterator<Type>
public class UnionIterator<Type>
- extends Object
- implements Iterator<Type>
An iterator that presents the union of two iterators. The second iterator is retrieved only when needed.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnionIterator
public UnionIterator(Iterator<Type> firstIterator,
Iterable<Type> next)
- Create a union iterator
- Parameters:
firstIterator
- the first iterator; may not be nullnext
- the Iterable from which the second iterator is to be obtained; may be null
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<Type>
next
public Type next()
- Specified by:
next
in interface Iterator<Type>
remove
public void remove()
- Specified by:
remove
in interface Iterator<Type>
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.