| java.lang.Object org.osbl.agent.model.condition.Operator org.osbl.agent.model.condition.BinaryOperator
BinaryOperator | public class BinaryOperator extends Operator (Code) | | This kind of Operator defines a binary operator, as in leftOperand OPERATOR rightOperand.
For example, in the expression: price > 30, then the ">" would be defined by one instance
of this class.
The expression for evaluation is constructed in this same spirit.
author: Sebastian Nozzi. |
Constructor Summary | |
public | BinaryOperator() Instantiates a new binary operator. | public | BinaryOperator(String operatorString) Instantiates a new binary operator with a operator as a String. | public | BinaryOperator(String label, String operatorCode) Instantiates a new binary operator with an operator as String and a label. |
Method Summary | |
protected String | getExpression(String left, String right) The implementation for this class builds the expression as in:
left operatorCode right
For example:
price >= 30
where "price" was the left part, "30" was the right part, and ">=" the operatorCode. |
BinaryOperator | public BinaryOperator()(Code) | | Instantiates a new binary operator.
|
BinaryOperator | public BinaryOperator(String operatorString)(Code) | | Instantiates a new binary operator with a operator as a String.
The label will be taken from the String as well.
Parameters: operatorString - the operator string |
BinaryOperator | public BinaryOperator(String label, String operatorCode)(Code) | | Instantiates a new binary operator with an operator as String and a label.
This allows the definition of Operators like "==", and show (in the UI) a
text like "equals".
Parameters: label - the label Parameters: operatorCode - the operator code |
|
|