Package org.refcodes.textual
Enum CaseStyle
- java.lang.Object
-
- java.lang.Enum<CaseStyle>
-
- org.refcodes.textual.CaseStyle
-
public enum CaseStyle extends java.lang.Enum<CaseStyle>
PredefinedCaseStyle
"implementations" (in terms of methods such astoCaseStyle(String)
) making use of theCaseStyleBuilder
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CAMEL_CASE
KEBAB_CASE
KEBAB_UPPER_CASE
NONE
PASCAL_CASE
SNAKE_CASE
SNAKE_UPPER_CASE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toCaseStyle(java.lang.String aText)
Converts the given text into the accordingCaseStyle
.static CaseStyle
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CaseStyle[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final CaseStyle NONE
-
CAMEL_CASE
public static final CaseStyle CAMEL_CASE
-
PASCAL_CASE
public static final CaseStyle PASCAL_CASE
-
SNAKE_CASE
public static final CaseStyle SNAKE_CASE
-
KEBAB_CASE
public static final CaseStyle KEBAB_CASE
-
SNAKE_UPPER_CASE
public static final CaseStyle SNAKE_UPPER_CASE
-
KEBAB_UPPER_CASE
public static final CaseStyle KEBAB_UPPER_CASE
-
-
Method Detail
-
values
public static CaseStyle[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CaseStyle c : CaseStyle.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CaseStyle valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
toCaseStyle
public java.lang.String toCaseStyle(java.lang.String aText)
Converts the given text into the accordingCaseStyle
.- Parameters:
aText
- The text to be converted to the according case style.- Returns:
- the string
-
-