de.nava.informa.utils.cleaner
Class CompositeMatcher

java.lang.Object
  extended by de.nava.informa.utils.cleaner.CompositeMatcher
All Implemented Interfaces:
CleanerMatcherIF

 class CompositeMatcher
extends Object
implements CleanerMatcherIF

Composite matcher follows Composite pattern to combine several matchers and present them as single instance. It uses simple rule to make a decision. If at least one matcher matches the item composite object also returns match.

Author:
Aleksey Gureev (spyromus@noizeramp.com)

Constructor Summary
CompositeMatcher()
           
 
Method Summary
 void add(CleanerMatcherIF m)
          Adds new matcher to the list.
 boolean isMatching(ItemIF item, ChannelIF channel)
          Invoked by cleaning engine to check given item in given channel for matching some rule.
 void remove(CleanerMatcherIF m)
          Removes matcher from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeMatcher

CompositeMatcher()
Method Detail

isMatching

public boolean isMatching(ItemIF item,
                          ChannelIF channel)
Invoked by cleaning engine to check given item in given channel for matching some rule.

Specified by:
isMatching in interface CleanerMatcherIF
Parameters:
item - item to check.
channel - channel where the item is.
Returns:
TRUE if item matches the rule.

add

public void add(CleanerMatcherIF m)
Adds new matcher to the list.

Parameters:
m - matcher object.

remove

public void remove(CleanerMatcherIF m)
Removes matcher from the list.

Parameters:
m - matcher object.


Copyright © 2002-2007 Niko Schmuck. All Rights Reserved.