public abstract class Sorter extends FilterBase implements Comparator
Used with Sorterator by Striterator to sort iterations.
Cannot be instantiated directly since an implementation of the compare method is required.
It should be noted, that the resulting sorting iterator cannot be produced incrementally since it must access all objects to complete the sort. For this reason care should be taken for sets that may be very large.
Constructor and Description |
---|
Sorter() |
Modifier and Type | Method and Description |
---|---|
abstract int |
compare(Object o1,
Object o2) |
Iterator |
filterOnce(Iterator src,
Object context)
Wrap the source iterator with this filter.
|
addFilter, filter, getProperty, getRequiredProperty, setProperty, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public final Iterator filterOnce(Iterator src, Object context)
FilterBase
filterOnce
in class FilterBase
src
- The source iterator.context
- The iterator evaluation context.public abstract int compare(Object o1, Object o2)
compare
in interface Comparator
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.