ModeShape Distribution 3.2.0.Final

org.modeshape.jcr.cache.document
Class UnionIterator<Type>

java.lang.Object
  extended by 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.


Constructor Summary
UnionIterator(Iterator<Type> firstIterator, Iterable<Type> next)
          Create a union iterator
 
Method Summary
 boolean hasNext()
           
 Type next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnionIterator

public UnionIterator(Iterator<Type> firstIterator,
                     Iterable<Type> next)
Create a union iterator

Parameters:
firstIterator - the first iterator; may not be null
next - the Iterable from which the second iterator is to be obtained; may be null
Method Detail

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>

ModeShape Distribution 3.2.0.Final

Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.