public class GuardCriterion extends Criterion
Red (tfeng) |
Yellow (tfeng) |
GTIngredient.FieldIterator
FIELD_SEPARATOR
Constructor and Description |
---|
GuardCriterion(GTIngredientList owner)
Construct a criterion within the given list as its owner.
|
GuardCriterion(GTIngredientList owner,
java.lang.String values)
Construct a criterion within the given list as its owner and initialize
all the elements with the given values, which are a string encoding of
those elements.
|
Modifier and Type | Method and Description |
---|---|
GTIngredientElement[] |
getElements()
Get the array of elements defined in this GTIngredient.
|
java.lang.Object |
getValue(int index)
Get the value of the index-th elements.
|
java.lang.String |
getValues()
Get a string that describes the values of all the elements.
|
boolean |
isApplicable(NamedObj object)
Check whether this GTIngredient is applicable to the object.
|
boolean |
match(NamedObj object)
Return whether this criterion can check the given object.
|
void |
setValue(int index,
java.lang.Object value)
Set the value of the index-th element.
|
void |
setValues(java.lang.String values)
Set the values of all the elements with a string that describes them.
|
void |
validate()
Validate the enablements and values of all the elements.
|
_decodeBooleanField, _decodeStringField, _encodeBooleanField, _encodeStringField, _escapeElementString, _findMatchingParen, _findSeparator, _unescapeElementString, disableAll, enableAll, getOwner, isEnabled, setEnabled, toString
public GuardCriterion(GTIngredientList owner)
owner
- The list as the owner of the constructed GTIngredientList.public GuardCriterion(GTIngredientList owner, java.lang.String values)
owner
- The list as the owner of the constructed GTIngredientList.values
- The string encoding of the values of the elements.public GTIngredientElement[] getElements()
getElements
in class GTIngredient
public java.lang.Object getValue(int index)
getValue
in class GTIngredient
index
- The index.setValue(int, Object)
public java.lang.String getValues()
getValues
in class GTIngredient
setValues(String)
public boolean isApplicable(NamedObj object)
isApplicable
in class GTIngredient
object
- The object.public boolean match(NamedObj object)
public void setValue(int index, java.lang.Object value)
setValue
in class GTIngredient
index
- The index.value
- The value.getValue(int)
public void setValues(java.lang.String values)
setValues
in class GTIngredient
values
- A string that describes the new values of all the
elements.getValues()
public void validate() throws ValidationException
validate
in class GTIngredient
ValidationException
- If some elements are invalid.