Class ConditionalExpression
- java.lang.Object
- 
- jadex.rules.parser.conditions.javagrammar.Expression
- 
- jadex.rules.parser.conditions.javagrammar.ConditionalExpression
 
 
- 
 public class ConditionalExpression extends Expression A conditional operation uses a condition to choose from two values: condition ? first_value : second_value
- 
- 
Field SummaryFields Modifier and Type Field Description protected ExpressionconditionThe condition.protected ExpressionfirstThe first value expression.static IFunctionFUNCTION_CONDITIONALA function to evaluate conditionals.protected ExpressionsecondThe second value expression.
 - 
Constructor SummaryConstructors Constructor Description ConditionalExpression(Expression condition, Expression first, Expression second)Create a new operation.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsVariable(Variable var)Test if a variable is contained in the expression.booleanequals(java.lang.Object o)Test if this constraint is equal to some object.ExpressiongetCondition()Get the condition.ExpressiongetFirstValue()Get the first value.ExpressiongetSecondValue()Get the second value.inthashCode()Get the hash code of this field access.java.lang.StringtoString()Get a string representation of this constraint.
 
- 
- 
- 
Field Detail- 
FUNCTION_CONDITIONALpublic static final IFunction FUNCTION_CONDITIONAL A function to evaluate conditionals.
 - 
conditionprotected Expression condition The condition.
 - 
firstprotected Expression first The first value expression.
 - 
secondprotected Expression second The second value expression.
 
- 
 - 
Constructor Detail- 
ConditionalExpressionpublic ConditionalExpression(Expression condition, Expression first, Expression second) Create a new operation.
 
- 
 - 
Method Detail- 
containsVariablepublic boolean containsVariable(Variable var) Test if a variable is contained in the expression.- Specified by:
- containsVariablein class- Expression
- Parameters:
- var- The variable.
- Returns:
- True, when the variable is contained.
 
 - 
getConditionpublic Expression getCondition() Get the condition.
 - 
getFirstValuepublic Expression getFirstValue() Get the first value.
 - 
getSecondValuepublic Expression getSecondValue() Get the second value.
 - 
toStringpublic java.lang.String toString() Get a string representation of this constraint.- Overrides:
- toStringin class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object o) Test if this constraint is equal to some object.- Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() Get the hash code of this field access.- Overrides:
- hashCodein class- java.lang.Object
 
 
- 
 
-