com.bigdata.btree.filter
Class TupleRemover<E>

java.lang.Object
  extended by com.bigdata.btree.filter.TupleRemover<E>
Type Parameters:
E -
All Implemented Interfaces:
ITupleFilter<E>, cutthecrap.utils.striterators.IFilter, Serializable

public abstract class TupleRemover<E>
extends Object
implements ITupleFilter<E>

Visits all elements visited by the source iterator and removes those matching the filter.

Note: If you want to only visit those elements that are being removed, then apply a TupleFilter first and then stack the TupleRemover on top and make #remove(Object) always return true. Note that you MUST also specify IRangeQuery.CURSOR if the index is a local B+Tree since traversal with concurrent modification is otherwise not supported.

Version:
$Id: TupleRemover.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Constructor Summary
TupleRemover()
           
 
Method Summary
 ITupleIterator<E> filter(Iterator src)
          Strengthened return type.
protected abstract  boolean remove(ITuple<E> e)
          true iff the tuple should be removed from the source IIndex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TupleRemover

public TupleRemover()
Method Detail

filter

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

Specified by:
filter in interface ITupleFilter<E>
Specified by:
filter in interface cutthecrap.utils.striterators.IFilter

remove

protected abstract boolean remove(ITuple<E> e)
true iff the tuple should be removed from the source IIndex.

Parameters:
e - The tuple.


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