formatEnumNameAsCapitalized: MY_ENUM_VALUE -> My enum value
formatEnumNameAsTitleCase: MY_ENUM_VALUE -> My Enum Value
formatEnumNameAsSpacedWords: MY_ENUM_VALUE -> MY ENUM VALUE
convertToStyleClassName: MY_ENUM_VALUE -> my-enum-value
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static <T extends Enum | |
| public static <T extends Enum | |
| public static <T extends Enum | Returns: A string suitable for use as a CSS class name. Example: MY_ENUM_VALUE -> my-enum-valueThe enum value to be converted. Must not be null. enumValue)Converts the enum name to a lower case string, replacing underscores with hyphens, suitable for use as a CSS class name. |
| public static <T extends Enum | Returns: A capitalized string representation of the enum name.Example: 1. null -> "" Example: 2. MY_ENUM_VALUE -> My enum value The enum value to convert. enumValue)Converts a string representation of an enum name to a capitalized format, replacing underscores with spaces and making the rest lowercase. |
| public static <T extends Enum | Returns: A capitalized string representation of the enum name.Example: 1. null -> nullDefaultValue Example: 2. Example: MY_ENUM_VALUE -> My enum value The enum value to convert. enumValue, String The default value to return if the input is null. nullDefaultValue)Converts a string representation of an enum name to a capitalized format, replacing underscores with spaces and making the rest lowercase. |
| public static <T extends Enum | Returns: A capitalized string representation of the enum name.Example: 1. null -> "" Example: 2. Example: MY_ENUM_VALUE -> My enum value The enum name to convert. enumName)Converts a string representation of an enum name to a capitalized format, replacing underscores with spaces and making the rest lowercase. |
| public static <T extends Enum | Returns: A string representation of the enum name with underscores replaced by spaces.Example: 1. null -> "" Example: 2. MY_ENUM_VALUE -> MY ENUM VALUE The enum value to be formatted. enumValue)Replaces underscores in the string representation of an enum name with spaces. |
| public static <T extends Enum | Returns: A string representation of the enum name with underscores replaced by spaces.Example: 1. null -> "" Example: 2. MY_ENUM_VALUE -> MY ENUM VALUE The string representation of the enum name to be formatted. enumName)Replaces underscores in the string representation of an enum name with spaces. |
| public static <T extends Enum | Returns: A title-cased string representation of the enum value.Example: 1. null -> "" Example: 2. MY_ENUM_VALUE -> My Enum Value The enum value to be formatted. enumValue)Converts an enum value to title case, replacing underscores with spaces and capitalizing the first letter of each word. |
| public static <T extends Enum | Returns: A title-cased string representation of the enum value.Example: 1. null -> nullDefaultValue Example: 2. MY_ENUM_VALUE -> My Enum Value The enum value to be formatted. enumValue, String The default value to return if the input is null. nullDefaultValue)Converts an enum value to title case, replacing underscores with spaces and capitalizing the first letter of each word. |
| public static <T extends Enum | Returns: A title-cased string representation of the enum value.Example: 1. null -> "" Example: 2. MY_ENUM_VALUE -> My Enum Value The string representation of the enum value to be formatted. enumName)Converts an enum value to title case, replacing underscores with spaces and capitalizing the first letter of each word. |
| public static <T extends Enum | Returns: A title-cased string representation of the enum value.Example: 1. null -> nullDefaultValue Example: 2. MY_ENUM_VALUE -> My Enum Value The string representation of the enum value to be formatted. enumName, String The default value to return if the input is null. nullDefaultValue)Converts an enum value to title case, replacing underscores with spaces and capitalizing the first letter of each word. |
| EnumUtil | back to summary |
|---|---|
| private EnumUtil() | |
| convertAllToStylesClassName | back to summary |
|---|---|
| public static <T extends Enum | |
| convertAllToStylesClassName | back to summary |
|---|---|
| public static <T extends Enum | |
| convertToStyleClassName | back to summary |
|---|---|
| public static <T extends Enum Converts the enum name to a lower case string, replacing underscores with hyphens, suitable for use as a CSS class name. This method does not accept null values for enumValue.
| |
| formatEnumNameAsCapitalized | back to summary |
|---|---|
| public static <T extends Enum Converts a string representation of an enum name to a capitalized format, replacing underscores with spaces and making the rest lowercase. If the input string is null, returns an empty string.
| |
| formatEnumNameAsCapitalized | back to summary |
|---|---|
| public static <T extends Enum Converts a string representation of an enum name to a capitalized format, replacing underscores with spaces and making the rest lowercase. If the input string is null, returns the specified default value. | |
| formatEnumNameAsCapitalized | back to summary |
|---|---|
| public static <T extends Enum Converts a string representation of an enum name to a capitalized format, replacing underscores with spaces and making the rest lowercase. If the input string is null, returns an empty string. | |
| formatEnumNameAsSpacedWords | back to summary |
|---|---|
| public static <T extends Enum Replaces underscores in the string representation of an enum name with spaces. Does not change letter case. If the input string is null, returns an empty string.
| |
| formatEnumNameAsSpacedWords | back to summary |
|---|---|
| public static <T extends Enum Replaces underscores in the string representation of an enum name with spaces. Does not change letter case. If the input string is null, returns an empty string. | |
| formatEnumNameAsTitleCase | back to summary |
|---|---|
| public static <T extends Enum Converts an enum value to title case, replacing underscores with spaces and capitalizing the first letter of each word. If the enum value is null, returns an empty string.
| |
| formatEnumNameAsTitleCase | back to summary |
|---|---|
| public static <T extends Enum Converts an enum value to title case, replacing underscores with spaces and capitalizing the first letter of each word. If the enum value is null, returns the specified default value. | |
| formatEnumNameAsTitleCase | back to summary |
|---|---|
| public static <T extends Enum Converts an enum value to title case, replacing underscores with spaces and capitalizing the first letter of each word. If the enum value is null, returns an empty string. | |
| formatEnumNameAsTitleCase | back to summary |
|---|---|
| public static <T extends Enum Converts an enum value to title case, replacing underscores with spaces and capitalizing the first letter of each word. If the enum value is null, returns the specified default value.
| |