fr.expression4j.basic
Interface Operator

All Known Implementing Classes:
GenericOperator, OperatorDivide, OperatorMinus, OperatorMultiply, OperatorPlus, OperatorPow, OperatorUnaryMinus, OperatorUnaryPlus

public interface Operator

Interface used to define an operator (like +, -, * ...)

Author:
SGINER

Field Summary
static java.lang.String OPERATOR_DIVIDE
           
static java.lang.String OPERATOR_MINUS
           
static java.lang.String OPERATOR_MULTIPLY
           
static java.lang.String OPERATOR_PLUS
           
static java.lang.String OPERATOR_POW
           
static java.lang.String OPERATOR_UNARY_MINUS
           
static java.lang.String OPERATOR_UNARY_PLUS
           
 
Method Summary
 java.lang.String getName()
          Get the name of the operator.
 java.lang.String getSymbol()
          Get the symbol associated to the operator (like +, -, AND ...).
 boolean isUnary()
          Tell if operator is an unary operator.
 

Field Detail

OPERATOR_DIVIDE

static final java.lang.String OPERATOR_DIVIDE
See Also:
Constant Field Values

OPERATOR_MULTIPLY

static final java.lang.String OPERATOR_MULTIPLY
See Also:
Constant Field Values

OPERATOR_PLUS

static final java.lang.String OPERATOR_PLUS
See Also:
Constant Field Values

OPERATOR_MINUS

static final java.lang.String OPERATOR_MINUS
See Also:
Constant Field Values

OPERATOR_POW

static final java.lang.String OPERATOR_POW
See Also:
Constant Field Values

OPERATOR_UNARY_PLUS

static final java.lang.String OPERATOR_UNARY_PLUS
See Also:
Constant Field Values

OPERATOR_UNARY_MINUS

static final java.lang.String OPERATOR_UNARY_MINUS
See Also:
Constant Field Values
Method Detail

isUnary

boolean isUnary()
Tell if operator is an unary operator.

Returns:
true if operator is an unary operator, false otherwise.

getName

java.lang.String getName()
Get the name of the operator.

Returns:
the name of the operator.

getSymbol

java.lang.String getSymbol()
Get the symbol associated to the operator (like +, -, AND ...). This symbol is used by the parser to identify the operator.

Returns:
the symbol associated to the operator.