de.cau.cs.kieler.core.model.util
Class ListSizeCondition

java.lang.Object
  extended by de.cau.cs.kieler.core.model.util.ListSizeCondition
All Implemented Interfaces:
ICondition<EObject>

public class ListSizeCondition
extends Object
implements ICondition<EObject>

A condition that checks whether a featured list of an EObject has a certain size.

Rating proposed yellow
(2010-01-26) msp

Constructor Summary
ListSizeCondition(EStructuralFeature thefeature, int thesize, String theoperator)
          Creates a size condition.
 
Method Summary
 boolean evaluate(EObject 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

ListSizeCondition

public ListSizeCondition(EStructuralFeature thefeature,
                         int thesize,
                         String theoperator)
Creates a size condition.

Parameters:
thefeature - a structural feature
thesize - the expected size of the corresponding list
theoperator - string representation of an operator such as ==, !=, <, >
Method Detail

evaluate

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

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