|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjmathlib.core.interpreter.RootObject
jmathlib.core.tokens.Token
jmathlib.core.tokens.OperandToken
jmathlib.core.tokens.FunctionToken
public class FunctionToken
Class used to represent any functions used in the expression
| Field Summary | |
|---|---|
boolean |
evaluationLockB
|
| Fields inherited from class jmathlib.core.tokens.Token |
|---|
priority |
| Fields inherited from interface jmathlib.core.constants.TokenConstants |
|---|
ADDSUB_PRIORITY, AND_PRIORITY, ANDAND_PRIORITY, ASSIGN_PRIORITY, BRACKET_PRIORITY, COMPARE_PRIORITY, CONCAT, MATRIX, MULDIV_PRIORITY, OR_PRIORITY, OROR_PRIORITY, PARAMETER, POWER_PRIORITY, RELATION_PRIORITY, SINGLE, ttDelimiter, ttNotSet, ttOperand, ttOperator |
| Fields inherited from interface jmathlib.core.constants.ErrorCodes |
|---|
ERR_BRACKET_OPEN, ERR_BRACKET_ORDER, ERR_FUNCTION_NOT_FOUND, ERR_FUNCTION_NOT_IMPLEMENTED, ERR_INSUFFICIENT_PARAMETERS, ERR_INVALID_PARAMETER, ERR_LVALUE_REQUIRED, ERR_MATRIX_SINGULAR, ERR_NOT_SQUARE_MATRIX, ERR_OPNOTSUPPORTED, ERR_TOO_MANY_PARAMETERS, ERR_USER_ERROR, ERR_VARIABLE_NOTDEFINED, OK, OK_FUNCTION_PROCESS |
| Constructor Summary | |
|---|---|
FunctionToken(java.lang.String _name)
constructor for function tokens |
|
FunctionToken(java.lang.String _name,
OperandToken _firstParameter)
constructor for function tokens |
|
FunctionToken(java.lang.String _name,
OperandToken[] _parameters)
constructor for function tokens |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests if an object is equal to this function |
OperandToken |
evaluate(Token[] _operands,
GlobalValues globals)
Executes the function referenced by this token |
java.lang.String |
getName()
Getter method, |
OperandToken |
getOperand(int index)
Return one of the operands |
OperandToken[] |
getOperands()
Return all operands |
boolean |
isEvaluated()
Getter method, |
boolean |
isScript()
Getter method, |
void |
setNoOfLeftHandArguments(int _number)
Sets the number of left-hand arguments of the function (e.g.) |
void |
setOperand(OperandToken _operand)
Set first operand of this function |
void |
setOperands(OperandToken[] _operands)
Set operands of this function |
java.lang.String |
toString()
|
| Methods inherited from class jmathlib.core.tokens.OperandToken |
|---|
add, asArray, Children, ctranspose, derivative, divide, expand, factorial, integral, isLeaf, isNull, isNumeric, leftDivide, mpower, mPower, multiply, negate, power, scalarDivide, scalarLeftDivide, scalarMultiply, simplify, subst, subtract, transpose |
| Methods inherited from class jmathlib.core.tokens.Token |
|---|
isDisplayResult, setDisplayResult, toMathMlString, toString |
| Methods inherited from class jmathlib.core.interpreter.RootObject |
|---|
clone, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public boolean evaluationLockB
| Constructor Detail |
|---|
public FunctionToken(java.lang.String _name)
_name - = the name of the function
public FunctionToken(java.lang.String _name,
OperandToken _firstParameter)
_name - = the name of the function_param - = the first argument
public FunctionToken(java.lang.String _name,
OperandToken[] _parameters)
_name - = the name of the function_param - = the parameters of the function| Method Detail |
|---|
public void setNoOfLeftHandArguments(int _number)
_number - = the number of left hand argumentspublic OperandToken getOperand(int index)
index - = index of operand
public OperandToken[] getOperands()
public void setOperands(OperandToken[] _operands)
_operands - = operands of this functionpublic void setOperand(OperandToken _operand)
_operand - = first operand of this function
public OperandToken evaluate(Token[] _operands,
GlobalValues globals)
evaluate in class Tokenoperands - = the functions operands -
public boolean isScript()
public boolean isEvaluated()
public java.lang.String getName()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - = object to test
if obj is an instance of Function or Function token then it
compares the name of obj to the functions name otherwise it
calls the superclasses version
public java.lang.String toString()
toString in class Token
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||