Class Criterion
- java.lang.Object
-
- ptolemy.actor.gt.GTIngredient
-
- ptolemy.actor.gt.ingredients.criteria.Criterion
-
- Direct Known Subclasses:
AttributeCriterion
,DynamicNameCriterion
,GuardCriterion
,NameCriterion
,PortCriterion
,StateTypeCriterion
,SubclassCriterion
public abstract class Criterion extends GTIngredient
A criterion to constrain an object in the host model.- Since:
- Ptolemy II 8.0
- Version:
- $Id$
- Author:
- Thomas Huining Feng
- Pt.AcceptedRating:
- Red (tfeng)
- Pt.ProposedRating:
- Yellow (tfeng)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.actor.gt.GTIngredient
GTIngredient.FieldIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.actor.gt.GTIngredient
FIELD_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description Criterion(GTIngredientList owner, int elementCount)
Construct a criterion within the given list as its owner containing a given number of elements.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
canCheck(NamedObj object)
Return whether this criterion can check the given object.abstract boolean
match(NamedObj object)
Test whether the given object in the host model matches the object in the pattern that has this criterion.-
Methods inherited from class ptolemy.actor.gt.GTIngredient
_decodeBooleanField, _decodeStringField, _encodeBooleanField, _encodeStringField, _escapeElementString, _findMatchingParen, _findSeparator, _unescapeElementString, disableAll, enableAll, getElements, getOwner, getValue, getValues, isApplicable, isEnabled, setEnabled, setValue, setValues, toString, validate
-
-
-
-
Constructor Detail
-
Criterion
public Criterion(GTIngredientList owner, int elementCount)
Construct a criterion within the given list as its owner containing a given number of elements. All elements are enabled at the beginning.- Parameters:
owner
- The list as the owner of the constructed GTIngredientList.elementCount
- The number of elements that the GTIngredient has.
-
-
Method Detail
-
canCheck
public boolean canCheck(NamedObj object)
Return whether this criterion can check the given object.- Parameters:
object
- The object.- Returns:
- true if the object can be checked.
-
match
public abstract boolean match(NamedObj object)
Test whether the given object in the host model matches the object in the pattern that has this criterion.- Parameters:
object
- The object.- Returns:
- true if the object matches.
-
-