Holger's
Java API

com.antelmann.util
Class ComboFilter<T>

java.lang.Object
  extended by com.antelmann.util.ComboFilter<T>
All Implemented Interfaces:
Filter<T>

public class ComboFilter<T>
extends Object
implements Filter<T>

a special filter that allows to combine different filters.

Since:
15.12.2010, 02:07:28
Author:
Holger Antelmann

Field Summary
 
Fields inherited from interface com.antelmann.util.Filter
EXCLUDE_ALL_FILTER, INCLUDE_ALL_FILTER
 
Constructor Summary
ComboFilter(Filter<? super T> f1, Filter<? super T> f2, BooleanOperator operator)
           
 
Method Summary
 boolean accept(T entry)
          returns true only if the given entry is accepted by this filter
static
<T> ComboFilter<T>
create(Filter<? super T> f1, Filter<? super T> f2, BooleanOperator operator)
           
 Filter<? super T> getFilter1()
           
 Filter<? super T> getFilter2()
           
 BooleanOperator getOperator()
           
static
<T> ComboFilter<T>
negate(Filter<? super T> filter)
          see Misc.reverseFilter(Filter)
 void setFilter1(Filter<? super T> f1)
           
 void setFilter2(Filter<? super T> f2)
           
 void setOperator(BooleanOperator operator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComboFilter

public ComboFilter(Filter<? super T> f1,
                   Filter<? super T> f2,
                   BooleanOperator operator)
Method Detail

create

public static <T> ComboFilter<T> create(Filter<? super T> f1,
                                        Filter<? super T> f2,
                                        BooleanOperator operator)

negate

public static <T> ComboFilter<T> negate(Filter<? super T> filter)
see Misc.reverseFilter(Filter)


getFilter1

public Filter<? super T> getFilter1()

setFilter1

public void setFilter1(Filter<? super T> f1)

getFilter2

public Filter<? super T> getFilter2()

setFilter2

public void setFilter2(Filter<? super T> f2)

getOperator

public BooleanOperator getOperator()

setOperator

public void setOperator(BooleanOperator operator)

accept

public boolean accept(T entry)
Description copied from interface: Filter
returns true only if the given entry is accepted by this filter

Specified by:
accept in interface Filter<T>


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads