org.mklab.tool.control.system.rpn
クラス ValueProcessor

java.lang.Object
  上位を拡張 org.mklab.nfc.rpn.AbstractProcessor
      上位を拡張 org.mklab.tool.control.system.rpn.ValueProcessor
すべての実装されたインタフェース:
ReversePolishNotationProcessor

public class ValueProcessor
extends AbstractProcessor

逆ポーランド記法を数値に関して評価(処理)するクラスです。

バージョン:
$Revision: 1.5 $, 2007/10/31
作成者:
Anan

コンストラクタの概要
ValueProcessor()
           
 
メソッドの概要
 ReversePolishNotationOperand addOperation(ReversePolishNotationOperand left, ReversePolishNotationOperand right)
          2個のオペランドの和を返します。
 String getResult(ReversePolishNotationOperand operand)
          オペランドを評価した結果を返します。
 ReversePolishNotationOperand inverseOperation(ReversePolishNotationOperand operand)
          オペランドの逆数を返します。
 ReversePolishNotationOperand multiplyOperation(ReversePolishNotationOperand left, ReversePolishNotationOperand right)
          2個のオペランドの積を返します。
 
クラス org.mklab.nfc.rpn.AbstractProcessor から継承されたメソッド
evaluate, getFormat, setFormat
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ValueProcessor

public ValueProcessor()
メソッドの詳細

getResult

public String getResult(ReversePolishNotationOperand operand)
インタフェース ReversePolishNotationProcessor の記述:
オペランドを評価した結果を返します。

パラメータ:
operand - 対象となるオペランド
戻り値:
オペランドを評価した結果
関連項目:
ReversePolishNotationProcessor.getResult(org.mklab.nfc.rpn.ReversePolishNotationOperand)

multiplyOperation

public ReversePolishNotationOperand multiplyOperation(ReversePolishNotationOperand left,
                                                      ReversePolishNotationOperand right)
インタフェース ReversePolishNotationProcessor の記述:
2個のオペランドの積を返します。

パラメータ:
left - オペランド
right - オペランド
戻り値:
2個のオペランドの積
関連項目:
ReversePolishNotationProcessor.multiplyOperation(org.mklab.nfc.rpn.ReversePolishNotationOperand, org.mklab.nfc.rpn.ReversePolishNotationOperand)

addOperation

public ReversePolishNotationOperand addOperation(ReversePolishNotationOperand left,
                                                 ReversePolishNotationOperand right)
インタフェース ReversePolishNotationProcessor の記述:
2個のオペランドの和を返します。

パラメータ:
left - 左オペランド
right - 左オペランド
戻り値:
2個のオペランドの和
関連項目:
ReversePolishNotationProcessor.addOperation(org.mklab.nfc.rpn.ReversePolishNotationOperand, org.mklab.nfc.rpn.ReversePolishNotationOperand)

inverseOperation

public ReversePolishNotationOperand inverseOperation(ReversePolishNotationOperand operand)
インタフェース ReversePolishNotationProcessor の記述:
オペランドの逆数を返します。

パラメータ:
operand - オペランド
戻り値:
オペランドの逆数
関連項目:
ReversePolishNotationProcessor.inverseOperation(org.mklab.nfc.rpn.ReversePolishNotationOperand)