org.openrdf.query.algebra.evaluation.iterator
Class OrderIterator

java.lang.Object
  extended by info.aduna.iteration.CloseableIterationBase<E,X>
      extended by info.aduna.iteration.DelayedIteration<BindingSet,QueryEvaluationException>
          extended by org.openrdf.query.algebra.evaluation.iterator.OrderIterator
All Implemented Interfaces:
CloseableIteration<BindingSet,QueryEvaluationException>, Iteration<BindingSet,QueryEvaluationException>

public class OrderIterator
extends DelayedIteration<BindingSet,QueryEvaluationException>

Sorts the input and optionally applies limit and distinct.

Author:
James Leigh, Arjohn Kampman

Constructor Summary
OrderIterator(CloseableIteration<BindingSet,QueryEvaluationException> iter, Comparator<BindingSet> comparator)
           
OrderIterator(CloseableIteration<BindingSet,QueryEvaluationException> iter, Comparator<BindingSet> comparator, int limit, boolean distinct)
           
 
Method Summary
protected  Iteration<BindingSet,QueryEvaluationException> createIteration()
           
protected  void handleClose()
           
 void remove()
           
 
Methods inherited from class info.aduna.iteration.DelayedIteration
hasNext, next
 
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
 

Constructor Detail

OrderIterator

public OrderIterator(CloseableIteration<BindingSet,QueryEvaluationException> iter,
                     Comparator<BindingSet> comparator)

OrderIterator

public OrderIterator(CloseableIteration<BindingSet,QueryEvaluationException> iter,
                     Comparator<BindingSet> comparator,
                     int limit,
                     boolean distinct)
Method Detail

createIteration

protected Iteration<BindingSet,QueryEvaluationException> createIteration()
                                                                  throws QueryEvaluationException
Specified by:
createIteration in class DelayedIteration<BindingSet,QueryEvaluationException>
Throws:
QueryEvaluationException

remove

public void remove()
            throws QueryEvaluationException
Specified by:
remove in interface Iteration<BindingSet,QueryEvaluationException>
Overrides:
remove in class DelayedIteration<BindingSet,QueryEvaluationException>
Throws:
QueryEvaluationException

handleClose

protected void handleClose()
                    throws QueryEvaluationException
Overrides:
handleClose in class DelayedIteration<BindingSet,QueryEvaluationException>
Throws:
QueryEvaluationException


Copyright © 2001-2009 Aduna. All Rights Reserved.