Returns an optional enum constant for the given type, using Enum#valueOf
.
Returns an optional enum constant for the given type, using Enum#valueOf
. If the
constant does not exist, Option#none
is returned. A common use case is for parsing
user input or falling back to a default enum constant. For example,
Enums.get(Country.class, countryInput).getOrElse(Country.DEFAULT);
3.1
Create Enumeration value
3.1