ANDを表す仕様。
ANDを表す仕様。
モデルの型
否定の仕様を表すモデル。
否定の仕様を表すモデル。
ある Specification
の否定をとる Specification
実装クラス。
デコレータではないので注意。
論理和の仕様を表すモデル。
論理和の仕様を表すモデル。
2つの Specification
の論理和をとる Specification
実装クラス。
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.
仕様を表すモデル。
仕様を表すモデル。
DDD本の中で説明している Specification パターンに則ったオブジェクトを表すインターフェイス。
Specification
の実装は、 AbstractSpecification
を基底クラスとして実装するとよい。
その場合、 #isSatisfiedBy(Object)
を実装する必要しかない。
ユーティリティクラス群。