FEJDMath
Class Token

java.lang.Object
  extended byFEJDMath.Token
All Implemented Interfaces:
java.lang.Cloneable

class Token
extends java.lang.Object
implements java.lang.Cloneable

Represents a token of the string


Field Summary
static int addition
          Addition constant
static int division
          Division constant
static int empty
          Empty constant
static int func
          Function constant
static int multiplication
          Multiplication constant
private  java.lang.String name
          The name of the function represented by the token
static int numeric
          Numeric constant
static int pdroit
          Right parenthesis constant
static int pgauche
          Left parenthesis constant
static int soustraction
          Substration constant
private  java.lang.String[] supportedMFct
          List of the supported math functions in upper case
private  int type
          The type of the token (one of the constant)
private  double value
          The numerical value of the token
 
Constructor Summary
Token(java.lang.String s)
           
 
Method Summary
 java.lang.Object clone()
           
 java.lang.String getName()
          Returns the name of the math function
 int getType()
          Returns the type of the token
 double getValue()
          Returns the value of the token
private  boolean isMFctSupported(java.lang.String s)
          Checks of the math function s is supported
private  void setToken(java.lang.String s)
          Sets the token to its value
 void setType(int type)
          Sets the type of the token
 void setValue(double value)
          Sets the value of the token
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

empty

public static final int empty
Empty constant

See Also:
Constant Field Values

func

public static final int func
Function constant

See Also:
Constant Field Values

numeric

public static final int numeric
Numeric constant

See Also:
Constant Field Values

addition

public static final int addition
Addition constant

See Also:
Constant Field Values

multiplication

public static final int multiplication
Multiplication constant

See Also:
Constant Field Values

soustraction

public static final int soustraction
Substration constant

See Also:
Constant Field Values

division

public static final int division
Division constant

See Also:
Constant Field Values

pgauche

public static final int pgauche
Left parenthesis constant

See Also:
Constant Field Values

pdroit

public static final int pdroit
Right parenthesis constant

See Also:
Constant Field Values

supportedMFct

private java.lang.String[] supportedMFct
List of the supported math functions in upper case


type

private int type
The type of the token (one of the constant)


value

private double value
The numerical value of the token


name

private java.lang.String name
The name of the function represented by the token

Constructor Detail

Token

public Token(java.lang.String s)
Method Detail

getType

public int getType()
Returns the type of the token


setType

public void setType(int type)
Sets the type of the token


getValue

public double getValue()
Returns the value of the token


setValue

public void setValue(double value)
Sets the value of the token


getName

public java.lang.String getName()
Returns the name of the math function


isMFctSupported

private boolean isMFctSupported(java.lang.String s)
Checks of the math function s is supported


setToken

private void setToken(java.lang.String s)
Sets the token to its value


clone

public java.lang.Object clone()