org.archive.wayback.util
Class ObjectFilterChain<E>

java.lang.Object
  extended by org.archive.wayback.util.ObjectFilterChain<E>
Type Parameters:
E -
All Implemented Interfaces:
ObjectFilter<E>

public class ObjectFilterChain<E>
extends java.lang.Object
implements ObjectFilter<E>

ObjectFilterChain implements AND logic to chain together multiple ObjectFilters into a composite. ABORT and EXCLUDE short circuit the chain, all filters must INCLUDE for inclusion.

Version:
$Date: 2007-07-24 17:34:39 -0700 (Tue, 24 Jul 2007) $, $Revision: 1872 $
Author:
brad

Field Summary
 
Fields inherited from interface org.archive.wayback.util.ObjectFilter
FILTER_ABORT, FILTER_EXCLUDE, FILTER_INCLUDE
 
Constructor Summary
ObjectFilterChain()
          Constructor
 
Method Summary
 void addFilter(ObjectFilter<E> filter)
           
 int filterObject(E o)
          inpect record and determine if it should be included in the results or not, or if processing of new records should stop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectFilterChain

public ObjectFilterChain()
Constructor

Method Detail

addFilter

public void addFilter(ObjectFilter<E> filter)
Parameters:
filter - to be added to the chain. filters are processed in the order they are added to the chain.

filterObject

public int filterObject(E o)
Description copied from interface: ObjectFilter
inpect record and determine if it should be included in the results or not, or if processing of new records should stop.

Specified by:
filterObject in interface ObjectFilter<E>
Parameters:
o - Object which should be checked for inclusion/exclusion or abort
Returns:
int of FILTER_INCLUDE, FILTER_EXCLUDE, or FILTER_ABORT


Copyright © 2005-2009 Internet Archive. All Rights Reserved.