nl.hiddewieringa.money.convert.ProviderContextExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of money-kotlin Show documentation
Show all versions of money-kotlin Show documentation
Kotlin extensions for javax.money (Moneta) JSR 354
The newest version!
package nl.hiddewieringa.money.convert
import javax.money.convert.ProviderContext
import javax.money.convert.ProviderContextBuilder
import javax.money.convert.RateType
/**
* @see ProviderContextBuilder.of
*/
fun providerContext(context: ProviderContext, init: ProviderContextBuilder.() -> Unit = {}): ProviderContext =
ProviderContextBuilder
.create(context)
.apply(init)
.build()
/**
* @see ProviderContextBuilder.of
*/
fun providerContext(provider: String, rateType: RateType, init: ProviderContextBuilder.() -> Unit = {}): ProviderContext =
ProviderContextBuilder
.of(provider, rateType)
.apply(init)
.build()
/**
* @see ProviderContextBuilder.of
*/
fun providerContext(provider: String, rateTypes: Collection, init: ProviderContextBuilder.() -> Unit = {}): ProviderContext =
ProviderContextBuilder
.of(provider, rateTypes)
.apply(init)
.build()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy