com.miginfocom.util.filter
Class NandFilter

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

public final class NandFilter
extends CompositeFilter

A composite filter that XOR:es the filter and returns the result. I.e. returns true if not both expressions return true.

See Also:
Serialized Form

Constructor Summary
NandFilter(Filter filter1, Filter filter2)
          Constructor.
NandFilter(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

NandFilter

public NandFilter(Filter filter1,
                  Filter filter2)
Constructor.

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

NandFilter

public NandFilter(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 expression1 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.