public class OrderIterator extends DelayedIteration<BindingSet,QueryEvaluationException>
Constructor and Description |
---|
OrderIterator(CloseableIteration<BindingSet,QueryEvaluationException> iter,
Comparator<BindingSet> comparator) |
OrderIterator(CloseableIteration<BindingSet,QueryEvaluationException> iter,
Comparator<BindingSet> comparator,
long limit,
boolean distinct) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
add(BindingSet next,
Collection<BindingSet> list) |
protected Iteration<BindingSet,QueryEvaluationException> |
createIteration()
Creates the iteration that should be iterated over.
|
protected void |
handleClose()
Closes this iteration as well as the underlying iteration if it has
already been created and happens to be a
CloseableIteration . |
protected List<BindingSet> |
makeList() |
protected NavigableMap<BindingSet,Collection<BindingSet>> |
makeOrderedMap(Comparator<BindingSet> comparator2) |
protected Set<BindingSet> |
makeOrderedSet()
This is used when distinct is set too true.
|
protected Collection<BindingSet> |
put(Map<BindingSet,Collection<BindingSet>> map,
BindingSet next,
Collection<BindingSet> list) |
void |
remove()
Calls the remove method of the underlying iteration.
|
protected Collection<BindingSet> |
remove(NavigableMap<BindingSet,Collection<BindingSet>> map,
BindingSet lastKey) |
protected void |
removeLast(Collection<BindingSet> lastResults) |
hasNext, next
close, isClosed
public OrderIterator(CloseableIteration<BindingSet,QueryEvaluationException> iter, Comparator<BindingSet> comparator)
public OrderIterator(CloseableIteration<BindingSet,QueryEvaluationException> iter, Comparator<BindingSet> comparator, long limit, boolean distinct)
protected Iteration<BindingSet,QueryEvaluationException> createIteration() throws QueryEvaluationException
DelayedIteration
createIteration
in class DelayedIteration<BindingSet,QueryEvaluationException>
QueryEvaluationException
protected List<BindingSet> makeList()
protected Set<BindingSet> makeOrderedSet()
protected void removeLast(Collection<BindingSet> lastResults)
protected Collection<BindingSet> remove(NavigableMap<BindingSet,Collection<BindingSet>> map, BindingSet lastKey)
protected boolean add(BindingSet next, Collection<BindingSet> list) throws QueryEvaluationException
QueryEvaluationException
protected Collection<BindingSet> put(Map<BindingSet,Collection<BindingSet>> map, BindingSet next, Collection<BindingSet> list) throws QueryEvaluationException
QueryEvaluationException
protected NavigableMap<BindingSet,Collection<BindingSet>> makeOrderedMap(Comparator<BindingSet> comparator2)
public void remove() throws QueryEvaluationException
DelayedIteration
remove
in interface Iteration<BindingSet,QueryEvaluationException>
remove
in class DelayedIteration<BindingSet,QueryEvaluationException>
QueryEvaluationException
protected void handleClose() throws QueryEvaluationException
DelayedIteration
CloseableIteration
.handleClose
in class DelayedIteration<BindingSet,QueryEvaluationException>
QueryEvaluationException
Copyright © 2001-2016 Aduna. All Rights Reserved.