public class Enums extends Object
Constructor and Description |
---|
Enums() |
Modifier and Type | Method and Description |
---|---|
static Enum<?> |
fromStringFuzzy(String value,
Enum<?>[] constants)
Convert a string to an enum with more permissive rules than
Enum valueOf(). |
@Nullable public static Enum<?> fromStringFuzzy(String value, Enum<?>[] constants)
Enum
valueOf().
This method is more permissive in the following ways:
value
- The string to convert.constants
- The list of constants for the Enum
to which you wish to convert.Copyright © 2019. All rights reserved.