com.miginfocom.util.filter
Class AndFilter

java.lang.Object
  extended by com.miginfocom.util.filter.CompositeFilter
      extended by com.miginfocom.util.filter.AndFilter
All Implemented Interfaces:
Filter, java.io.Serializable

public final class AndFilter
extends CompositeFilter

A composite filter that AND:s the filter and returns the result.

See Also:
Serialized Form

Constructor Summary
AndFilter(Filter filter1, Filter filter2)
          Constructor.
AndFilter(java.lang.String name, Filter filter1, Filter filter2)
          Constructor.
 
Method Summary
 boolean accept(java.lang.Object o)
          If the filter accepts o.
 
Methods inherited from class com.miginfocom.util.filter.CompositeFilter
equals, getFilter1, getFilter2, getName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndFilter

public AndFilter(Filter filter1,
                 Filter filter2)
Constructor.

Parameters:
filter1 - The first filter.
filter2 - The second filter. Only evaluated if filter1 is true.

AndFilter

public AndFilter(java.lang.String name,
                 Filter filter1,
                 Filter filter2)
Constructor.

Parameters:
name - The name for the filter.
filter1 - The first filter.
filter2 - The second filter. Only evaluated if filter1 is true.
Method Detail

accept

public final boolean accept(java.lang.Object o)
Description copied from interface: Filter
If the filter accepts o.

Parameters:
o - The object to judge. Can be null.
Returns:
If the filter accepts o.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.