org.mklab.nfc.rpn
インタフェース ReversePolishNotationProcessor

既知の実装クラスの一覧:
AbstractExpressionProcessor, AbstractProcessor, ExpressionProcessor, MaximaExpressionProcessor, TeXExpressionProcessor, ValueProcessor, WithoutCancellationExpressionProcessor

public interface ReversePolishNotationProcessor

逆ポーランド記法を評価するプロセッサを表すインターフェースです。

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

メソッドの概要
 ReversePolishNotationOperand addOperation(ReversePolishNotationOperand left, ReversePolishNotationOperand right)
          2個のオペランドの和を返します。
 ReversePolishNotationOperand evaluate(ReversePolishNotationOperand operand)
          オペランドを逆ポーランド記法により評価した結果を返します。
 String getFormat()
          数値の出力フォーマットを返します。
 String getResult(ReversePolishNotationOperand operand)
          オペランドを評価した結果を返します。
 ReversePolishNotationOperand inverseOperation(ReversePolishNotationOperand operand)
          オペランドの逆数を返します。
 ReversePolishNotationOperand multiplyOperation(ReversePolishNotationOperand left, ReversePolishNotationOperand right)
          2個のオペランドの積を返します。
 void setFormat(String format)
          数値の出力フォーマットを設定します。
 

メソッドの詳細

evaluate

ReversePolishNotationOperand evaluate(ReversePolishNotationOperand operand)
オペランドを逆ポーランド記法により評価した結果を返します。

パラメータ:
operand - 対象となるオペランド
戻り値:
評価した結果のオペランド

getResult

String getResult(ReversePolishNotationOperand operand)
オペランドを評価した結果を返します。

パラメータ:
operand - 対象となるオペランド
戻り値:
オペランドを評価した結果

getFormat

String getFormat()
数値の出力フォーマットを返します。

戻り値:
数値の出力フォーマット

setFormat

void setFormat(String format)
数値の出力フォーマットを設定します。

パラメータ:
format - 数値の出力フォーマット

inverseOperation

ReversePolishNotationOperand inverseOperation(ReversePolishNotationOperand operand)
オペランドの逆数を返します。

パラメータ:
operand - オペランド
戻り値:
オペランドの逆数

addOperation

ReversePolishNotationOperand addOperation(ReversePolishNotationOperand left,
                                          ReversePolishNotationOperand right)
2個のオペランドの和を返します。

パラメータ:
left - 左オペランド
right - 左オペランド
戻り値:
2個のオペランドの和

multiplyOperation

ReversePolishNotationOperand multiplyOperation(ReversePolishNotationOperand left,
                                               ReversePolishNotationOperand right)
2個のオペランドの積を返します。

パラメータ:
left - オペランド
right - オペランド
戻り値:
2個のオペランドの積