org.archive.wayback.util
Class ObjectFilterChain<E>
java.lang.Object
org.archive.wayback.util.ObjectFilterChain<E>
- Type Parameters:
E -
- All Implemented Interfaces:
- ObjectFilter<E>
public class ObjectFilterChain<E>
- extends 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: 2010-09-29 05:28:38 +0700 (Wed, 29 Sep 2010) $, $Revision: 3262 $
- Author:
- brad
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectFilterChain
public ObjectFilterChain()
- Constructor
getFilters
public ArrayList<ObjectFilter<E>> getFilters()
- Returns:
- the filters
setFilters
public void setFilters(ArrayList<ObjectFilter<E>> filters)
- Parameters:
filters - the filters to set
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.
addFilters
public void addFilters(Collection<ObjectFilter<E>> list)
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-2011 Internet Archive. All Rights Reserved.