Package

org.sisioh.baseunits.scala

util

Permalink

package util

ユーティリティクラス群。

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. util
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class AndSpecification[T] extends Specification[T]

    Permalink

    ANDを表す仕様。

    ANDを表す仕様。

    T

    モデルの型

  2. class NotSpecification[T] extends Specification[T]

    Permalink

    否定の仕様を表すモデル。

    否定の仕様を表すモデル。

    ある Specification の否定をとる Specification 実装クラス。 デコレータではないので注意。

    T

    NotSpecificationの型

  3. class OrSpecification[T] extends Specification[T]

    Permalink

    論理和の仕様を表すモデル。

    論理和の仕様を表すモデル。

    2つの Specification の論理和をとる Specification 実装クラス。

    T

    OrSpecificationの型

  4. class Ratio extends AnyRef

    Permalink

    org.sisioh.baseunits.scala.util.Ratioは、2つ同じ単位を持つの量の商(比率)であり、単位のない値である。

    org.sisioh.baseunits.scala.util.Ratioは、2つ同じ単位を持つの量の商(比率)であり、単位のない値である。

    このクラスの利点は、比率の計算を遅延評価できることにある。

    Ratio represents the unitless division of two quantities of the same type. The key to its usefulness is that it defers the calculation of a decimal value for the ratio. An object which has responsibility for the two values in the ratio and understands their quantities can create the ratio, which can then be used by any client in a unitless form, so that the client is not required to understand the units of the quantity. At the same time, this gives control of the precision and rounding rules to the client, when the time comes to compute a decimal value for the ratio. The client typically has the responsibilities that enable an appropriate choice of these parameters.

  5. trait Specification[T] extends AnyRef

    Permalink

    仕様を表すモデル。

    仕様を表すモデル。

    DDD本の中で説明している Specification パターンに則ったオブジェクトを表すインターフェイス。 Specificationの実装は、 AbstractSpecificationを基底クラスとして実装するとよい。 その場合、 #isSatisfiedBy(Object) を実装する必要しかない。

    T

    Specificationの型

Value Members

  1. object Ratio

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped