info.aduna.collections.iterators
Class UnionIterator<E>

java.lang.Object
  extended by info.aduna.iteration.CloseableIterationBase<E,X>
      extended by info.aduna.iteration.LookAheadIteration<E,X>
          extended by info.aduna.iteration.UnionIteration<E,RuntimeException>
              extended by info.aduna.collections.iterators.UnionIterator<E>
All Implemented Interfaces:
CloseableIterator<E>, CloseableIteration<E,RuntimeException>, Iteration<E,RuntimeException>, Closeable, Iterator<E>

public class UnionIterator<E>
extends UnionIteration<E,RuntimeException>
implements CloseableIterator<E>

An iterator that returns the bag union of the results of a number of iterators. Note that the result of the iterator is a bag, not a set. The UnionIterator does not do any duplicate filtering.


Field Summary
 
Fields inherited from class info.aduna.iteration.CloseableIterationBase
logger
 
Constructor Summary
UnionIterator(Iterable<? extends Iterator<? extends E>> args)
          Creates a new UnionIterator that returns the bag union of the results of a number of iterators.
UnionIterator(Iterator<? extends E>... args)
          Creates a new UnionIterator that returns the bag union of the results of a number of iterators.
 
Method Summary
 
Methods inherited from class info.aduna.iteration.UnionIteration
getNextElement, handleClose
 
Methods inherited from class info.aduna.iteration.LookAheadIteration
hasNext, next, remove
 
Methods inherited from class info.aduna.iteration.CloseableIterationBase
close, isClosed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.aduna.collections.iterators.CloseableIterator
close
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Constructor Detail

UnionIterator

public UnionIterator(Iterator<? extends E>... args)
Creates a new UnionIterator that returns the bag union of the results of a number of iterators.

Parameters:
args - The iterators containing the elements to iterate over.

UnionIterator

public UnionIterator(Iterable<? extends Iterator<? extends E>> args)
Creates a new UnionIterator that returns the bag union of the results of a number of iterators.

Parameters:
args - The iterators containing the elements to iterate over.


Copyright © 1997-2008 Aduna. All Rights Reserved.