Factory

object Factory(source)

A Money factory.

Functions

Link copied to clipboard
fun of(amount: Number, currency: Currency): Money
fun of(amount: Number, currency: String): Money

Creates a Money. Calculations using it are rounded using a Rounding strategy configured with RoundingMode.HALF_EVEN.

fun of(amount: Number, currency: Currency, rounding: Rounding): Money
fun of(amount: Number, currency: String, rounding: Rounding): Money

Creates a Money. Calculations using it are rounded using the specified Rounding strategy.

fun of(amount: Number, currency: Currency, mode: RoundingMode): Money
fun of(amount: Number, currency: String, mode: RoundingMode): Money

Creates a Money. Calculations using it are rounded using a Rounding strategy configured with the specified mode.