public enum StringConvention extends java.lang.Enum<StringConvention>
Enum Constant and Description |
---|
CAMEL_CASE
Camel case, lower case first letter.
|
CAMEL_CASE_CAPITALIZED
Camel case capitalized like class names.
|
HYPHENATED
Hyphenated, in lower case.
|
RAW
Raw unconverted string.
|
UNDER_SCORE_SEPARATED
Hyphenated, in upper case.
|
UNDER_SCORE_SEPARATED_LOWER_CASE
Hyphenated, in lower case.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.lang.String str)
Format the string with this format.
|
static java.lang.String |
format(StringConvention convention,
java.lang.String str)
Format a string according to a convention.
|
static StringConvention |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static StringConvention[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StringConvention CAMEL_CASE_CAPITALIZED
public static final StringConvention CAMEL_CASE
public static final StringConvention HYPHENATED
public static final StringConvention RAW
public static final StringConvention UNDER_SCORE_SEPARATED
public static final StringConvention UNDER_SCORE_SEPARATED_LOWER_CASE
public static StringConvention[] values()
for (StringConvention c : StringConvention.values()) System.out.println(c);
public static StringConvention valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String format(java.lang.String str)
str
- The stringpublic static java.lang.String format(StringConvention convention, java.lang.String str)
convention
- The string convention to usestr
- The string to format