com.sanpudo.formula
クラス FunctionAdaptor

java.lang.Object
  上位を拡張 com.sanpudo.formula.FunctionAdaptor
すべての実装されたインタフェース:
FunctionImplementation
直系の既知のサブクラス:
SystemFunctions

public class FunctionAdaptor
extends Object
implements FunctionImplementation

ユーザ定義関数を実装する際に拡張するためのアダプタクラス。

作成者:
Sanpudo.

メソッドの概要
 String[] names()
          このクラスで定義されている関数名の配列を返す。
 int numberOfArgs(String name)
          指定した名前の関数の引数の個数を返す。
 boolean supports(String name)
          このクラスで定義されている関数名であるときtrueを返す。
 BigDecimal value(String name, BigDecimal[] args)
          指定した名前の関数のBigDecimalの関数実行結果を返す。
 double value(String name, double[] args)
          指定した名前の関数のdoubleの関数実行結果を返す。
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

value

public double value(String name,
                    double[] args)
             throws FunctionEvalException
指定した名前の関数のdoubleの関数実行結果を返す。

定義:
インタフェース FunctionImplementation 内の value
パラメータ:
name - 関数名
args - 関数に渡す引数
戻り値:
関数実行結果
例外:
関数実行時に評価できない状況が発生
FunctionEvalException

value

public BigDecimal value(String name,
                        BigDecimal[] args)
                 throws FunctionEvalException
指定した名前の関数のBigDecimalの関数実行結果を返す。

定義:
インタフェース FunctionImplementation 内の value
パラメータ:
name - 関数名
args - 関数に渡す引数
戻り値:
関数実行結果
例外:
関数実行時に評価できない状況が発生
FunctionEvalException

names

public String[] names()
このクラスで定義されている関数名の配列を返す。

定義:
インタフェース FunctionImplementation 内の names
戻り値:
このクラスで定義されてる関数名の配列

numberOfArgs

public int numberOfArgs(String name)
指定した名前の関数の引数の個数を返す。

定義:
インタフェース FunctionImplementation 内の numberOfArgs
パラメータ:
name - 関数名
戻り値:
関数の引数の個数

supports

public boolean supports(String name)
このクラスで定義されている関数名であるときtrueを返す。

定義:
インタフェース FunctionImplementation 内の supports
パラメータ:
name - 関数名
戻り値:
このクラスで定義されている関数である時true