de.cau.cs.kieler.core.util
Class CompoundCondition<T>

java.lang.Object
  extended by de.cau.cs.kieler.core.util.CompoundCondition<T>
Type Parameters:
T - the type for which the condition is used
All Implemented Interfaces:
ICondition<T>

public class CompoundCondition<T>
extends Object
implements ICondition<T>

A condition that is composed of a set of other conditions.

Rating proposed yellow
(2010-01-26) msp

Constructor Summary
CompoundCondition(Collection<ICondition<T>> theconditions)
          Creates a compound condition from a collection of conditions.
CompoundCondition(ICondition<T>[] theconditions)
          Creates a compound condition from an array of conditions.
 
Method Summary
 boolean evaluate(T object)
          Evaluate this condition on the given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundCondition

public CompoundCondition(Collection<ICondition<T>> theconditions)
Creates a compound condition from a collection of conditions.

Parameters:
theconditions - the conditions

CompoundCondition

public CompoundCondition(ICondition<T>[] theconditions)
Creates a compound condition from an array of conditions.

Parameters:
theconditions - the conditions
Method Detail

evaluate

public boolean evaluate(T object)
Evaluate this condition on the given object.

Specified by:
evaluate in interface ICondition<T>
Parameters:
object - a target object
Returns:
true if the condition is met for the object