jp.finaluna.api.type.util
インタフェース MathUtil


@Rcsid(value="$Revision: 15138 $ $Date: 2009-01-17 02:38:48 +0900 $")
public interface MathUtil

数値系のユーティリティ。

計算処理を行うユーティリティクラス。

区分値として以下の区分を保持する。

バージョン:
$Revision: 15138 $ $Date: 2009-01-17 02:38:48 +0900 $
作成者:
NTTデータ

入れ子のクラスの概要
static class MathUtil.Boundary
          境界値区分(列挙型)。
static class MathUtil.InRange
          範囲区分(列挙型)。
static class MathUtil.Round
          丸めモード区分(列挙型)。
 
メソッドの概要
 DecimalType averageDecimal(ListType<DecimalType> values, int scale)
           DecimalTypeの平均を算出する。
 DecimalType averageDecimal(ListType<DecimalType> values, int scale, MathUtil.Round round)
           DecimalTypeの平均を算出する。
 DecimalType averageInteger(ListType<IntegerType> values, int scale)
           IntegerTypeの平均を算出する。
 DecimalType averageInteger(ListType<IntegerType> values, int scale, MathUtil.Round round)
           IntegerTypeの平均を算出する。
 DecimalType sumDecimal(ListType<DecimalType> values)
           DecimalTypeを合計する。
 IntegerType sumInteger(ListType<IntegerType> values)
           IntegerTypeを合計する。
 

メソッドの詳細

sumDecimal

DecimalType sumDecimal(ListType<DecimalType> values)

DecimalTypeを合計する。

パラメータ:
values - DecimalTypeリスト
戻り値:
合計

sumInteger

IntegerType sumInteger(ListType<IntegerType> values)

IntegerTypeを合計する。

パラメータ:
values - IntegerTypeリスト
戻り値:
合計

averageDecimal

DecimalType averageDecimal(ListType<DecimalType> values,
                           int scale)

DecimalTypeの平均を算出する。 丸めモードにはROUND_DOWNを使用する。

パラメータ:
values - DecimalTypeリスト
scale - スケール
戻り値:
平均

averageDecimal

DecimalType averageDecimal(ListType<DecimalType> values,
                           int scale,
                           MathUtil.Round round)

DecimalTypeの平均を算出する。

パラメータ:
values - DecimalTypeリスト
scale - スケール
round - 丸めモード
戻り値:
平均

averageInteger

DecimalType averageInteger(ListType<IntegerType> values,
                           int scale)

IntegerTypeの平均を算出する。 丸めモードにはROUND_DOWNを使用する。

パラメータ:
values - IntegerTypeリスト
scale - スケール
戻り値:
平均

averageInteger

DecimalType averageInteger(ListType<IntegerType> values,
                           int scale,
                           MathUtil.Round round)

IntegerTypeの平均を算出する。

パラメータ:
values - IntegerTypeリスト
scale - スケール
round - 丸めモード
戻り値:
平均