org.nfunk.jep
Class Operator

java.lang.Object
  extended by org.nfunk.jep.Operator
Direct Known Subclasses:
XOperator

public class Operator
extends Object

A class containing information about an operator.

Author:
Rich Morris Created on 19-Oct-2003
See Also:
OperatorSet

Constructor Summary
Operator(String name, PostfixMathCommandI pfmc)
          construct a new operator.
Operator(String name, String symbol, PostfixMathCommandI pfmc)
          construct a new operator, with a different name and symbol
 
Method Summary
 String getName()
          returns a unique name definig this operator.
 PostfixMathCommandI getPFMC()
           
 String getSymbol()
          returns the symbol used by this operator.
 void setPFMC(PostfixMathCommandI pfmc)
           
 String toString()
          returns a verbose representation of the operator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Operator

public Operator(String name,
                PostfixMathCommandI pfmc)
construct a new operator.

Parameters:
name - printable name of operator
pfmc - postfix math command for opperator

Operator

public Operator(String name,
                String symbol,
                PostfixMathCommandI pfmc)
construct a new operator, with a different name and symbol

Parameters:
name - name of operator, must be unique, used when describing operator
symbol - printable name of operator, used for printing equations
pfmc - postfix math command for opperator
Method Detail

getSymbol

public final String getSymbol()
returns the symbol used by this operator.


getName

public final String getName()
returns a unique name definig this operator.


getPFMC

public final PostfixMathCommandI getPFMC()

setPFMC

public final void setPFMC(PostfixMathCommandI pfmc)

toString

public String toString()
returns a verbose representation of the operator.

Overrides:
toString in class Object


Copyright © 2014. All rights reserved.