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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequalspublic final Iterator filterOnce(Iterator src, Object context)
FilterBasefilterOnce in class FilterBasesrc - The source iterator.context - The iterator evaluation context.public abstract int compare(Object o1, Object o2)
compare in interface ComparatorCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.