Package-level declarations

Types

Link copied to clipboard

Decorator that adds observer capability to any StateContainer.

Link copied to clipboard

Thread-safe notifier for state changes.

Link copied to clipboard
fun interface StateObserver<T>

Interface for observing state changes.

Functions

Link copied to clipboard
fun <T> combineObservers(vararg observers: StateObserver<T>): StateObserver<T>

Creates a composite observer from multiple observers.

Link copied to clipboard
fun <T> StateObserver<T>.filter(predicate: (T, T) -> Boolean): StateObserver<T>

Creates a StateObserver that only reacts when a predicate is satisfied.

Link copied to clipboard
inline fun <T, R : T> StateObserver<T>.filterType(): StateObserver<T>

Creates a StateObserver that only reacts to specific state types.

Link copied to clipboard

Creates a StateObserver that only reacts to actual state changes (not same state).

Link copied to clipboard

Convenience observer that only cares about the new state.