visidia.simulation.process.criterion
Class CompoundCriterion

java.lang.Object
  extended by visidia.simulation.process.criterion.CompoundCriterion
All Implemented Interfaces:
Criterion

public class CompoundCriterion
extends java.lang.Object
implements Criterion

This class defines a criterion as a combination of several criteria. The CompoundCriterion is matched if and only if all contained criteria are matched.


Constructor Summary
CompoundCriterion()
          Instantiates a new (empty) compound criterion.
 
Method Summary
 void add(Criterion c)
          Adds a criterion to the CompoundCriterion.
 boolean isMatchedBy(java.lang.Object o)
          Checks if object satisfies the criterion.
 boolean remove(Criterion c)
          Removes a criterion.
 void removeAllCriterion()
          Removes all criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundCriterion

public CompoundCriterion()
Instantiates a new (empty) compound criterion.

Method Detail

add

public void add(Criterion c)
Adds a criterion to the CompoundCriterion.

Parameters:
c - the criterion

remove

public boolean remove(Criterion c)
Removes a criterion.

Parameters:
c - the criterion
Returns:
true, if successful

removeAllCriterion

public void removeAllCriterion()
Removes all criteria.


isMatchedBy

public boolean isMatchedBy(java.lang.Object o)
Checks if object satisfies the criterion.

Specified by:
isMatchedBy in interface Criterion
Parameters:
o - the object
Returns:
true, if criterion is satisfied. If the CompoundCriterion is empty, returns false.
See Also:
Criterion.isMatchedBy(java.lang.Object)