fr.expression4j.basic.impl
Class GenericOperator

java.lang.Object
  extended by fr.expression4j.basic.impl.GenericOperator
All Implemented Interfaces:
Operator

public class GenericOperator
extends java.lang.Object
implements Operator

Author:
SGINER

Field Summary
 
Fields inherited from interface fr.expression4j.basic.Operator
OPERATOR_DIVIDE, OPERATOR_MINUS, OPERATOR_MULTIPLY, OPERATOR_PLUS, OPERATOR_POW, OPERATOR_UNARY_MINUS, OPERATOR_UNARY_PLUS
 
Constructor Summary
GenericOperator(java.lang.String name, java.lang.String symbol, boolean isUnary)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericOperator

public GenericOperator(java.lang.String name,
                       java.lang.String symbol,
                       boolean isUnary)
Method Detail

isUnary

public boolean isUnary()
Description copied from interface: Operator
Tell if operator is an unary operator.

Specified by:
isUnary in interface Operator
Returns:
true if operator is an unary operator, false otherwise.

getName

public java.lang.String getName()
Description copied from interface: Operator
Get the name of the operator.

Specified by:
getName in interface Operator
Returns:
the name of the operator.

getSymbol

public java.lang.String getSymbol()
Description copied from interface: Operator
Get the symbol associated to the operator (like +, -, AND ...). This symbol is used by the parser to identify the operator.

Specified by:
getSymbol in interface Operator
Returns:
the symbol associated to the operator.