|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.expression4j.core.impl.ExpressionModelImpl
public class ExpressionModelImpl
Constructor Summary | |
---|---|
ExpressionModelImpl(java.lang.String name)
|
Method Summary | |
---|---|
void |
addBinaryOperator(Operator operator,
int priority)
Add a binary operator |
void |
addExpressionElement(ExpressionElement expressionElement,
int priority)
Add expression element to the model. |
void |
addUnaryOperator(Operator operator)
Add unary operator to the model |
java.util.List |
getBinaryOperators(int priority)
Get the list of binary operator for a given priority. |
ExpressionElement |
getExpressionElement(int priority)
Get expression element for a given priority. |
ExpressionElement |
getExpressionElement(java.lang.String name)
Get expression element for a given name. |
int |
getMaxExpressionElementPriority()
Get the max element priority. |
int |
getMaxOperatorPriority()
Get the max binary operator priority. |
java.lang.String |
getName()
get the name of the expression model |
Operator |
getOperator(java.lang.String name)
Get the named operator. |
int |
getOperatorLevel(Operator operator)
Get the level associated to a given operator. |
java.util.List |
getUnaryOperators()
Get the list of unary operators. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExpressionModelImpl(java.lang.String name)
Method Detail |
---|
public void addUnaryOperator(Operator operator) throws ModelException
ExpressionModel
addUnaryOperator
in interface ExpressionModel
operator
- operator to add
ModelException
- if operator is not an unary operatorpublic void addBinaryOperator(Operator operator, int priority) throws ModelException
ExpressionModel
addBinaryOperator
in interface ExpressionModel
operator
- operator to addpriority
- operator priority (from 1 to ... depend of your model)
ModelException
- if operator is not a binary operatorpublic void addExpressionElement(ExpressionElement expressionElement, int priority) throws ModelException
ExpressionModel
addExpressionElement
in interface ExpressionModel
expressionElement
- element to add.priority
- order to manage element (from 1 to ...)
ModelException
- if priority is not consecutive to others priority.public int getMaxOperatorPriority()
ExpressionModel
getMaxOperatorPriority
in interface ExpressionModel
public int getMaxExpressionElementPriority()
ExpressionModel
getMaxExpressionElementPriority
in interface ExpressionModel
public java.util.List getUnaryOperators()
ExpressionModel
getUnaryOperators
in interface ExpressionModel
public java.util.List getBinaryOperators(int priority)
ExpressionModel
getBinaryOperators
in interface ExpressionModel
priority
- priority operator to get.
public ExpressionElement getExpressionElement(int priority)
ExpressionModel
getExpressionElement
in interface ExpressionModel
priority
- priority expression element to get.
null
if not found.public ExpressionElement getExpressionElement(java.lang.String name)
ExpressionModel
getExpressionElement
in interface ExpressionModel
name
- name of expression element to get.
null
if not found.public Operator getOperator(java.lang.String name)
ExpressionModel
getOperator
in interface ExpressionModel
name
- name of the operator.
null
otherwise.public int getOperatorLevel(Operator operator)
ExpressionModel
getOperatorLevel
in interface ExpressionModel
operator
- operator to get the level.
public java.lang.String getName()
ExpressionModel
getName
in interface ExpressionModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |