localize

fun <T, R, LOCALIZER : PolyglotReferenceValueLocalizer<T, R>> LOCALIZER.localize(value: T, clock: ClockWrapper = SYSTEM_CLOCK.collectAsStateWithLifecycle().value, timeZone: TimeZone = SYSTEM_TIMEZONE.collectAsStateWithLifecycle().value, maxTick: Duration? = null): State<R>

Utility function that collects the values from this LOCALIZER in a lifecycle-aware manner.

Parameters

value

the value to localize

clock

the Clock to use for localization. By default, it collects SYSTEM_CLOCK, so any clock change is immediately reflected

timeZone

the TimeZone to use for localization. By default, it collects SYSTEM_TIMEZONE, so any timezone change is immediately reflected

maxTick

the maximum amount of to wait for a recomputation (as long as this underlying provider returns a non-null TickingValue.nextTick). If null (the default), no max tick bound is applied.

See also