atrium-domain-builders-jvm / ch.tutteli.atrium.domain.builders.reporting / TranslatorOptionCommon

TranslatorOptionCommon

interface TranslatorOptionCommon (source)

Provides options to create a Translator -- those options have to be provided on all platforms.

Properties

localeOrderDecider

abstract val localeOrderDecider: <ERROR CLASS>

The previously chosen LocaleOrderDecider.

translationSupplier

abstract val translationSupplier: <ERROR CLASS>

The previously chosen TranslationSupplier.

Functions

withDefaultTranslator

abstract fun withDefaultTranslator(primaryLocale: <ERROR CLASS>, vararg fallbackLocales: <ERROR CLASS>): ObjectFormatterOption

Uses CoreFactory.newTranslator as Translator where the specified translationSupplier is used to retrieve translations, the specified localeOrderDecider to determine candidate Locales and primaryLocale is used as primary Locale and the optional fallbackLocales as fallback Locales.

withTranslator

abstract fun withTranslator(factory: (<ERROR CLASS>, <ERROR CLASS>) -> <ERROR CLASS>): ObjectFormatterOption

Uses the given factory to build a Translator.

Extension Functions

asExpect

fun <T, A> A.asExpect(): <ERROR CLASS><T>
fun <T : Any, A> A.asExpect(assertionCreator: <ERROR CLASS><T>.() -> Unit): A

Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable.

Inheritors

TranslatorOption

expect interface TranslatorOption : TranslatorOptionCommon

Provides options to create a Translator -- the platform specific interface might provide further options.