|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.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 ExpressionModeloperator - operator to add
ModelException - if operator is not an unary operator
public void addBinaryOperator(Operator operator,
int priority)
throws ModelException
ExpressionModel
addBinaryOperator in interface ExpressionModeloperator - operator to addpriority - operator priority (from 1 to ... depend of your model)
ModelException - if operator is not a binary operator
public void addExpressionElement(ExpressionElement expressionElement,
int priority)
throws ModelException
ExpressionModel
addExpressionElement in interface ExpressionModelexpressionElement - 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 ExpressionModelpublic int getMaxExpressionElementPriority()
ExpressionModel
getMaxExpressionElementPriority in interface ExpressionModelpublic java.util.List getUnaryOperators()
ExpressionModel
getUnaryOperators in interface ExpressionModelpublic java.util.List getBinaryOperators(int priority)
ExpressionModel
getBinaryOperators in interface ExpressionModelpriority - priority operator to get.
public ExpressionElement getExpressionElement(int priority)
ExpressionModel
getExpressionElement in interface ExpressionModelpriority - priority expression element to get.
null if not found.public ExpressionElement getExpressionElement(java.lang.String name)
ExpressionModel
getExpressionElement in interface ExpressionModelname - name of expression element to get.
null if not found.public Operator getOperator(java.lang.String name)
ExpressionModel
getOperator in interface ExpressionModelname - name of the operator.
null otherwise.public int getOperatorLevel(Operator operator)
ExpressionModel
getOperatorLevel in interface ExpressionModeloperator - 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 | |||||||||