addListenerAndInvoke

fun addListenerAndInvoke(initialValue: T, listener: (T, T) -> Unit)

Adds a listener and calls ValueObserver.update on this new listener with given initial value.

Parameters

initialValue

Initial value to notify.

listener

Listener to add and notify.