Event representing a change in the name of a household.
This event is triggered whenever the name of a household is updated within the domain, encapsulating the new household name. Subscribing listeners can handle this event to perform tasks such as updating related data or notifying other components.
Extends thePrincipesEvent class, carrying a String payload
that contains the new household name.-
Constructor Summary
ConstructorsConstructorDescriptionHouseholdNameChangedEvent(String newName) Creates a newHouseholdNameChangedEventinstance with the specified new household name. -
Method Summary
Modifier and TypeMethodDescriptionstatic HouseholdNameChangedEventCreates and returns a newHouseholdNameChangedEventinstance with the specified new household name.
-
Constructor Details
-
HouseholdNameChangedEvent
Creates a newHouseholdNameChangedEventinstance with the specified new household name.- Parameters:
newName- The new name of the household to be set in the event.
-
-
Method Details
-
to
Creates and returns a newHouseholdNameChangedEventinstance with the specified new household name.Looks cleaner with HousehouldNameChangedEvent.to("newName") than new HouseholdNameChangedEvent("newName"). Also, it is more readable and easier to understand.
- Parameters:
newName- The new name of the household to be set in the event.- Returns:
- A
HouseholdNameChangedEventinstance encapsulating the new household name.
-