| java.lang.Object org.osbl.agent.model.condition.Operator org.osbl.agent.model.condition.MethodOperator
MethodOperator | public class MethodOperator extends Operator (Code) | | This kind of Operator is used when the operation is a method call.
The resulting expression will be of the form:
left.operatorCode(right)
Thus, the method to be called should accept only one parameter.
author: Sebastian Nozzi. |
Constructor Summary | |
public | MethodOperator() Instantiates a new method operator. | public | MethodOperator(String operatorString) Instantiates a new method operator specifying an operatorString. | public | MethodOperator(String label, String operatorCode) Instantiates a new method operator, specifying label and operatorCode. |
Method Summary | |
protected String | getExpression(String left, String right) Constructs the expression as in a method call, for example:
message.matches("W.*")
where "message" is the left part, "W.*" is the right part and "matches" the operatorCode. |
MethodOperator | public MethodOperator()(Code) | | Instantiates a new method operator.
|
MethodOperator | public MethodOperator(String operatorString)(Code) | | Instantiates a new method operator specifying an operatorString.
The operatorString should be a method name.
Parameters: operatorString - a method name, used for both implementation and label. |
MethodOperator | public MethodOperator(String label, String operatorCode)(Code) | | Instantiates a new method operator, specifying label and operatorCode.
Parameters: label - the descriptive label. Parameters: operatorCode - the operator code, which should be a method name. |
|
|