EnumUtils extension
- on
Methods
-
when<
R> (Map< Enum, R Function()> map) → R - A when function for Enums. calling the function corresponding to the Enum of the object.
-
whenOrElse<
R> (Map< Enum, R Function()> map, {required R orElse()}) → R - A when or else function for Enums. It takes a Map of Enums to functions, and returns the result of calling the function corresponding to the Enum of the object.