com.bigdata.btree.filter
Class TupleTransformer<E,F>

java.lang.Object
  extended by com.bigdata.btree.filter.TupleTransformer<E,F>
All Implemented Interfaces:
ITupleFilter<F>, cutthecrap.utils.striterators.IFilter, Serializable
Direct Known Subclasses:
AtomicRowFilter

public abstract class TupleTransformer<E,F>
extends Object
implements ITupleFilter<F>

Abstract base class for an ITupleFilter that transforms the data type of the keys and/or values.

Version:
$Id: TupleTransformer.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form
TODO:
better encapsulation for patterns with a 1:1 transform (one tuple in, one out) and patterns with a M:1 (many in, one out) and 1:M (1 in, many out)?

Field Summary
protected  ITupleSerializer<? extends Object,F> tupleSer
          The serialization provider for the transformed tuples.
 
Constructor Summary
TupleTransformer(ITupleSerializer<? extends Object,F> tupleSer)
           
 
Method Summary
 ITupleIterator<F> filter(Iterator src)
          Strengthened return type.
protected abstract  ITupleIterator<F> newTransformer(LookaheadTupleFilter.ILookaheadTupleIterator<E> src)
          Method responsible for creating a new instance of the iterator that reads from the lookahead source whose tuples are of the source type and visits the transformed tuples.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tupleSer

protected final ITupleSerializer<? extends Object,F> tupleSer
The serialization provider for the transformed tuples.

Constructor Detail

TupleTransformer

public TupleTransformer(ITupleSerializer<? extends Object,F> tupleSer)
Parameters:
tupleSer - The serialization provider for the transformed tuples.
Method Detail

filter

public ITupleIterator<F> filter(Iterator src)
Description copied from interface: ITupleFilter
Strengthened return type.

Specified by:
filter in interface ITupleFilter<F>
Specified by:
filter in interface cutthecrap.utils.striterators.IFilter
Parameters:
src - The source iterator.

newTransformer

protected abstract ITupleIterator<F> newTransformer(LookaheadTupleFilter.ILookaheadTupleIterator<E> src)
Method responsible for creating a new instance of the iterator that reads from the lookahead source whose tuples are of the source type and visits the transformed tuples.



Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.