|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.expression4j.basic.impl.OperatorManagerImpl
public class OperatorManagerImpl
Constructor Summary | |
---|---|
OperatorManagerImpl(java.lang.String name)
|
Method Summary | |
---|---|
void |
addOperatorImpl(OperatorImpl operatorImpl)
Add an operator implementation to the manager. |
MathematicalElement |
computeValue(java.lang.String operatorName,
MathematicalElement element)
Eval an unary operator on given value. |
MathematicalElement |
computeValue(java.lang.String operatorName,
MathematicalElement leftElement,
MathematicalElement rightElement)
Eval a binary operator on given values. |
java.lang.String |
getName()
get operator manager name |
OperatorImpl |
getOperatorImpl(java.lang.String name)
Get an operator impl. |
java.util.List |
getOperatorImplList()
Get the list of operator impl. |
void |
removeOperatorImpl(OperatorImpl operatorImpl)
Remove an operator implementation to the manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OperatorManagerImpl(java.lang.String name)
Method Detail |
---|
public void addOperatorImpl(OperatorImpl operatorImpl)
OperatorManager
addOperatorImpl
in interface OperatorManager
operatorImpl
- operator to add.public void removeOperatorImpl(OperatorImpl operatorImpl)
OperatorManager
removeOperatorImpl
in interface OperatorManager
operatorImpl
- operator to remove.public MathematicalElement computeValue(java.lang.String operatorName, MathematicalElement element) throws EvalException
OperatorManager
computeValue
in interface OperatorManager
operatorName
- operator to applyelement
- value on wich apply the operator
EvalException
- if an error occurd (operator not define for the given element ...)public MathematicalElement computeValue(java.lang.String operatorName, MathematicalElement leftElement, MathematicalElement rightElement) throws EvalException
OperatorManager
computeValue
in interface OperatorManager
operatorName
- operator to applyleftElement
- left value of operatorrightElement
- right value of operator
EvalException
- EvalException if an error occurd (operator not define for the given element ...)public java.lang.String getName()
OperatorManager
getName
in interface OperatorManager
public OperatorImpl getOperatorImpl(java.lang.String name)
OperatorManager
getOperatorImpl
in interface OperatorManager
name
- operator impl to get.
null
otherwise.public java.util.List getOperatorImplList()
OperatorManager
getOperatorImplList
in interface OperatorManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |