Package com.vaadin.flow.signals.function
Interface SignalComputation<T>
- Type Parameters:
T- the computed value type
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Computes a signal value based on other signals. The computation is
automatically re-run when any dependent signal changes.
Dependencies are automatically tracked - any signal whose value is accessed during the computation becomes a dependency. The computation is lazy and only runs when the signal value is accessed and the previous value might have been invalidated by dependent signal changes.
- See Also:
-
Method Summary
-
Method Details
-
compute
T compute()Computes the signal value, automatically tracking dependencies on other signals.- Returns:
- the computed value, may be
null
-