Package org.yamcs.xtce
Class Condition
- java.lang.Object
-
- org.yamcs.xtce.Condition
-
- All Implemented Interfaces:
Serializable,BooleanExpression,MatchCriteria
public class Condition extends Object implements BooleanExpression
The Condition is XTCE overlaps with the Comparison. Condition allows two operands to be Parameters- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.yamcs.xtce.MatchCriteria
ALWAYS_MATCH
-
-
Constructor Summary
Constructors Constructor Description Condition(OperatorType comparisonOperator, ParameterInstanceRef lValueRef, String stringValue)Condition(OperatorType comparisonOperator, ParameterInstanceRef lValueRef, ParameterInstanceRef rValueRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperatorTypegetComparisonOperator()Set<Parameter>getDependentParameters()Return the set of parameters which are required in order to evaluate the match criteria.ParameterInstanceRefgetlValueRef()ObjectgetrValueRef()booleanisMet(CriteriaEvaluator evaluator)Return true if the condition matchesvoidresolveValueType()Called when the type of the parameter used for comparison is known, so we have to find the value from stringValue that we can compare to itStringtoExpressionString()StringtoString()
-
-
-
Constructor Detail
-
Condition
public Condition(OperatorType comparisonOperator, ParameterInstanceRef lValueRef, ParameterInstanceRef rValueRef)
-
Condition
public Condition(OperatorType comparisonOperator, ParameterInstanceRef lValueRef, String stringValue)
-
-
Method Detail
-
resolveValueType
public void resolveValueType()
Called when the type of the parameter used for comparison is known, so we have to find the value from stringValue that we can compare to it
-
isMet
public boolean isMet(CriteriaEvaluator evaluator)
Description copied from interface:MatchCriteriaReturn true if the condition matches- Specified by:
isMetin interfaceMatchCriteria- Returns:
-
getDependentParameters
public Set<Parameter> getDependentParameters()
Description copied from interface:MatchCriteriaReturn the set of parameters which are required in order to evaluate the match criteria. If no parameter is required, return an empty set.- Specified by:
getDependentParametersin interfaceMatchCriteria- Returns:
-
toExpressionString
public String toExpressionString()
- Specified by:
toExpressionStringin interfaceMatchCriteria
-
getlValueRef
public ParameterInstanceRef getlValueRef()
-
getrValueRef
public Object getrValueRef()
- Returns:
- right value reference - could be itself an ParameterInstanceRef
-
getComparisonOperator
public OperatorType getComparisonOperator()
-
-