org.pf.osf
Class MatchRuleFilter

java.lang.Object
  extended by org.pf.osf.MatchRuleFilter
All Implemented Interfaces:
IObjectFilter

public class MatchRuleFilter
extends java.lang.Object
implements IObjectFilter

A special filter that uses internally a MatchRule to check whether an object matches or not. The objects it can check must implement either java.util.Map or org.pf.reflect.AttributeReadAccess.

Version:
1.0
Author:
M.Duchrow
See Also:
AttributeReadAccess

Constructor Summary
MatchRuleFilter(MatchRule rule)
          Initialize the new instance with a match rule.
 
Method Summary
 MatchRule getMatchRule()
           
 boolean matches(java.lang.Object object)
          Returns true if the given object matches this filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatchRuleFilter

public MatchRuleFilter(MatchRule rule)
Initialize the new instance with a match rule.

Parameters:
rule - The match rule to be used for object matching
Throws:
java.lang.IllegalArgumentException - if the given parameter is null
Method Detail

getMatchRule

public MatchRule getMatchRule()

matches

public boolean matches(java.lang.Object object)
Returns true if the given object matches this filter. That is, its attributes match the underlying MatchRule.

Specified by:
matches in interface IObjectFilter
Parameters:
object - Either an instance of Map or AttributeReadAccess
See Also:
AttributeReadAccess