I
- The parameterized generic type of the source iterator.E
- The generic type of the elements visited by the source iterator.F
- The generic type of the elements after applying this filter. This
will differ from E
iff the filter is transforming the
element type.public abstract class ChunkedFilter<I extends IChunkedIterator<E>,E,F> extends Object implements IFilter<I,E,F>
Modifier and Type | Field and Description |
---|---|
protected IKeyOrder<F> |
keyOrder
The natural order of the filtered chunks.
|
protected Object |
state
Caller's object.
|
Constructor and Description |
---|
ChunkedFilter() |
ChunkedFilter(Object state) |
ChunkedFilter(Object state,
IKeyOrder<F> keyOrder) |
Modifier and Type | Method and Description |
---|---|
IChunkedOrderedIterator<F> |
filter(I src)
Wrap the source iterator with an iterator that applies this filter.
|
protected abstract F[] |
filterChunk(E[] chunk)
Process a chunk of elements, returning another chunk of elements.
|
protected Object state
protected final IKeyOrder<F> keyOrder
null
. When
null
the filtered iterator is assumed to be
unordered. This assumption is made since chunk-at-a-time
transforms can change the natural order of the chunk in many, many
different ways, e.g., by changing the type of the elements in the chunk.public ChunkedFilter()
public ChunkedFilter(Object state)
public IChunkedOrderedIterator<F> filter(I src)
Note: There was a historical compiler problem with this method when generics were not specified.
filter
in interface IFilter<I extends IChunkedIterator<E>,E,F>
src
- The source iterator.protected abstract F[] filterChunk(E[] chunk)
chunk
- A chunk of elements from the source iterator.null
.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.