|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.webcompmath.data.StandardFunction
public class StandardFunction
This class exists to associate standard functions, such as sin and abs, with their names. Note that the functions are actually implemented in the ExprsssionProgram class, where they are only represented by numerical operation codes. An object of type StandardFunction contains a name and the operation code of the associated standard function. A static routine, standardFunctionName, gives the name associated with each operation code.
Constructor Summary | |
---|---|
StandardFunction(int opCode)
Create a StandardFunction object to represent the standard function with the given operation code, where opCode is one of the codes for standard functions defined in class ExpressionProgram. |
|
StandardFunction(java.lang.String name,
int opCode)
Create a StandardFunction object to represent the standard function with the given operation code, where opCode is one of the codes for stadard functions defined in class ExpressionProgram. |
Method Summary | |
---|---|
java.lang.String |
getName()
Return the name of this StandardFunction oject. |
int |
getOpCode()
Return the operation code for this standard function. |
void |
setName(java.lang.String name)
Change the name of this StandardFunction. |
static java.lang.String |
standardFunctionName(int opCode)
Return the usual name for the standard function with the specified opCode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StandardFunction(int opCode)
opCode
- opcode to use in creating the functionpublic StandardFunction(java.lang.String name, int opCode)
name
- name of the functionopCode
- opcode to use in creating the functionMethod Detail |
---|
public int getOpCode()
public java.lang.String getName()
getName
in interface MathObject
public void setName(java.lang.String name)
setName
in interface MathObject
name
- name of the functionpublic static java.lang.String standardFunctionName(int opCode)
opCode
- opcode whose name is desired
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |