beforeUpdate abstract method

void beforeUpdate(
  1. T oldValue,
  2. T newValue
)

Called immediately before a value is updated.

This method can be used to perform actions or validations before a state change occurs. It is called after the decision to update the value has been made but before the internal state is actually modified.

Parameters:

  • oldValue: The current value before the update
  • newValue: The proposed new value for the update

Implementation

void beforeUpdate(T oldValue, T newValue);