fable.utility.strategy
Class CombinedFilter

java.lang.Object
  extended by fable.utility.strategy.CombinedFilter
All Implemented Interfaces:
FilterStrategy

public class CombinedFilter
extends java.lang.Object
implements FilterStrategy

CombinedFilter is a class that combines a combination of FilterStrategies

Author:
Christopher Moh

Constructor Summary
CombinedFilter(java.util.Collection<FilterStrategy> x)
          Creates a new FilterStrategy by combining the FilterStrategies in the input collection.
 
Method Summary
 boolean isOk(FableComponent t)
          Determines if the FableComponent should be allowed in the filter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CombinedFilter

public CombinedFilter(java.util.Collection<FilterStrategy> x)
Creates a new FilterStrategy by combining the FilterStrategies in the input collection. Although a copy is made of the input collection (such that it can be modified without affecting this), the underlying FilterStrategies should not be changed

Parameters:
x - A collection of FilterStrategies to be combined
Requires:
x != null, for all elements p in x, p != null
Effects:
Creates a new CombinedFilter
Modifies:
this
Method Detail

isOk

public boolean isOk(FableComponent t)
Description copied from interface: FilterStrategy
Determines if the FableComponent should be allowed in the filter

Specified by:
isOk in interface FilterStrategy
Parameters:
t - FableComponent to check
Returns:
true if the FableComponent is allowed to pass, false otherwise