jwo.utils.expression
Class MathOperator

java.lang.Object
  extended byjwo.utils.expression.MathOperator

public final class MathOperator
extends Object

Stores an enumerated list of operators that may be parsed by the MathParser. Modified from original code described at www.devx.com/premier/mgznarch/javapro/2001/05may01/ps0105/ps0105.asp.

Version:
2.2, 14th February, 2001, modified 5th August, 2004.
Author:
Daniel Savarese, modified by Jo Wood.

Field Summary
static MathOperator ACOS
           
static MathOperator ADD
           
static MathOperator ASIN
           
static MathOperator ATAN
           
static MathOperator COS
           
static MathOperator DIVIDE
           
static MathOperator E
           
static MathOperator EXPONENT
           
static MathOperator GAUSS
           
static MathOperator LN
           
static MathOperator MULTIPLY
           
static MathOperator PI
           
static MathOperator RAND
           
static MathOperator SIN
           
static MathOperator SQRT
           
static MathOperator SUBTRACT
           
static MathOperator TAN
           
static MathOperator X
           
static MathOperator Y
           
static MathOperator Z1
           
static MathOperator Z2
           
 
Constructor Summary
MathOperator()
           
 
Method Summary
static MathOperator getOperator(Object token)
          Retrieves the operator matching the given type.
 String toString()
          Reports a string representation of this operator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADD

public static final MathOperator ADD

SUBTRACT

public static final MathOperator SUBTRACT

MULTIPLY

public static final MathOperator MULTIPLY

DIVIDE

public static final MathOperator DIVIDE

EXPONENT

public static final MathOperator EXPONENT

SIN

public static final MathOperator SIN

COS

public static final MathOperator COS

TAN

public static final MathOperator TAN

ASIN

public static final MathOperator ASIN

ACOS

public static final MathOperator ACOS

ATAN

public static final MathOperator ATAN

SQRT

public static final MathOperator SQRT

LN

public static final MathOperator LN

RAND

public static final MathOperator RAND

GAUSS

public static final MathOperator GAUSS

Z1

public static final MathOperator Z1

Z2

public static final MathOperator Z2

X

public static final MathOperator X

Y

public static final MathOperator Y

PI

public static final MathOperator PI

E

public static final MathOperator E
Constructor Detail

MathOperator

public MathOperator()
Method Detail

getOperator

public static final MathOperator getOperator(Object token)
Retrieves the operator matching the given type.

Parameters:
token - Type of operator to retrieve.
Returns:
Matched operator.

toString

public String toString()
Reports a string representation of this operator.

Returns:
String representation of this operator.


Copyright Jo Wood, 1996-2005, last modified, 11th March, 2005