Class EnumConverter
java.lang.Object
com.github.hypfvieh.cli.parser.converter.EnumConverter
- All Implemented Interfaces:
IValueConverter<Enum<?>>
Converts a string to an
Enum constant of the type specified in the constructor
and the same case-insensitive name.- Since:
- 1.0.4 - 2023-05-11
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EnumConverter
-
-
Method Details
-
convert
Description copied from interface:IValueConverterCalled to convert command line argument String to specified type.- Specified by:
convertin interfaceIValueConverter<Enum<?>>- Parameters:
_str- input string, maybe empty/blank, never null- Returns:
- converted value, never null
-