AI-generated Key Takeaways
-
NightModeChangedEventis an immutable event that signals a change in the UI's night mode state (entering or exiting). -
It provides a constructor to create an event instance specifying whether night mode is being entered (
true) or exited (false). -
The
inNightMode()method indicates the current night mode status, returningtruefor entering andfalsefor exiting. -
Includes methods for equality checks (
equals()) and hash code generation (hashCode()).
An immutable event representing a change in state relating to night mode.
Public Constructor Summary
|
NightModeChangedEvent(boolean inNightMode)
Construct an event to represent entering or exiting night mode.
|
Public Method Summary
| boolean |
equals(Object o)
Tests if this
NightModeChangedEvent is equal to another. |
| int |
hashCode()
|
| boolean |
inNightMode()
Check whether night mode is being entered or exited.
|
Inherited Method Summary
Public Constructors
public NightModeChangedEvent (boolean inNightMode)
Construct an event to represent entering or exiting night mode.
Parameters
| inNightMode | true if the UI is entering night mode, or false if it is
exiting night mode
|
|---|
Public Methods
public boolean equals (Object o)
Tests if this NightModeChangedEvent is equal to another.
The events are considered equal if they both represent the same transition to or from night mode.
Parameters
| o |
|---|
public int hashCode ()
public boolean inNightMode ()
Check whether night mode is being entered or exited.
Returns
trueif the UI is entering night mode, orfalseif it is exiting night mode