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

java.lang.Object
  extended by de.cau.cs.kieler.core.ui.util.ListSizeCondition
All Implemented Interfaces:
ICondition

public class ListSizeCondition
extends Object
implements ICondition

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)
          Creates a size condition.
 
Method Summary
 boolean evaluate(Object 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)
Creates a size condition.

Parameters:
thefeature - a structural feature
thesize - the expected size of the corresponding list
Method Detail

evaluate

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

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