org.ckkloverdos.filter
Class OrFilter

java.lang.Object
  extended by org.ckkloverdos.filter.OrFilter
All Implemented Interfaces:
IFilter

public class OrFilter
extends java.lang.Object
implements IFilter

An implementation of IFilter providing boolean OR semantics between two other filters.

Author:
Christos KK Loverdos

Constructor Summary
OrFilter(IFilter a, IFilter b)
          Constructs an AndFilter that will combine filters a and b with boolean OR.
 
Method Summary
 boolean accept(java.lang.Object object, java.lang.Object hints)
          Tests if object is accepted according to this filter semantics (boolean OR).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrFilter

public OrFilter(IFilter a,
                IFilter b)
Constructs an AndFilter that will combine filters a and b with boolean OR.

Parameters:
a -
b -
Method Detail

accept

public boolean accept(java.lang.Object object,
                      java.lang.Object hints)
Tests if object is accepted according to this filter semantics (boolean OR). If hints is an instance of BinaryHint, then each one of the binary hint's components is passed to the first and second filters respectively. Otherwise, the same hints object is passed to both filters.

Specified by:
accept in interface IFilter
Parameters:
object -
hints -


Copyright © 1999-2007 Christos KK Loverdos. All Rights Reserved.