com.miginfocom.util.filter
Class XorFilter

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

public final class XorFilter
extends CompositeFilter

A composite filter that XOR:es the filter and returns the result. I.e. returns true if the filters return different results.

See Also:
Serialized Form

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

XorFilter

public XorFilter(Filter filter1,
                 Filter filter2)
Constructor.

Parameters:
filter1 - The first filter.
filter2 - The second filter.

XorFilter

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

Parameters:
name - The name for the filter.
filter1 - The first filter.
filter2 - The second filter.
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.