Package de.exlll.configlib
Enum Class NameFormatters
- All Implemented Interfaces:
NameFormatter,Serializable,Comparable<NameFormatters>,Constable,Function<String,String>
This class contains instances of ready-to-use
NameFormatters.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionANameFormatterthat simply returns the given name.ANameFormatterthat transforms camelCase to lower-kebab-case.ANameFormatterthat transforms camelCase to lower_underscore.ANameFormatterthat transforms camelCase to UPPER-KEBAB-CASE.ANameFormatterthat transforms camelCase to UPPER_UNDERSCORE. -
Method Summary
Modifier and TypeMethodDescriptionstatic NameFormattersReturns the enum constant of this class with the specified name.static NameFormatters[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface de.exlll.configlib.NameFormatter
apply, format
-
Enum Constant Details
-
IDENTITY
ANameFormatterthat simply returns the given name. -
LOWER_UNDERSCORE
ANameFormatterthat transforms camelCase to lower_underscore.For example, myPrivateField becomes my_private_field.
-
UPPER_UNDERSCORE
ANameFormatterthat transforms camelCase to UPPER_UNDERSCORE.For example, myPrivateField becomes MY_PRIVATE_FIELD.
-
LOWER_KEBAB_CASE
ANameFormatterthat transforms camelCase to lower-kebab-case.For example, myPrivateField becomes my-private-field.
-
UPPER_KEBAB_CASE
ANameFormatterthat transforms camelCase to UPPER-KEBAB-CASE.For example, myPrivateField becomes MY-PRIVATE-FIELD.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-