Package org.midheaven.lang
Enum Class Strings.Casing
- All Implemented Interfaces:
Serializable,Comparable<Strings.Casing>,Constable
- Enclosing class:
Strings
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFirst letter of word is lower case, the rest is lowercase.Also known as snake case all in lower case letters: "Hello world" is "hello_world"First letter of word is upper case, the rest is lowercase.Any text separated by spacesall in upper case letters: "Hello world" is "HELLO_WORLD"also known as kebab case all in lower case letters: "Hello world" is "hello-world" -
Method Summary
Modifier and TypeMethodDescriptionjoinWords(Strings.Splitter splitter) Performs joinWords.splitWords(CharSequence text) Performs splitWords.static Strings.CasingReturns the enum constant of this class with the specified name.static Strings.Casing[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
-
PLAIN
Any text separated by spaces -
UPPER
all in upper case letters: "Hello world" is "HELLO_WORLD" -
LOWER
Also known as snake case all in lower case letters: "Hello world" is "hello_world" -
PASCAL
First letter of word is upper case, the rest is lowercase. New words have uppercase initial: "Hello world" is "HelloWorld" -
CAMEL
First letter of word is lower case, the rest is lowercase. New words have uppercase initial: "Hello world" is "helloWorld" -
URL
also known as kebab case all in lower case letters: "Hello world" is "hello-world"
-
-
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
-
splitWords
Performs splitWords.- Parameters:
text- the text value- Returns:
- the result of splitWords
-
joinWords
Performs joinWords.- Parameters:
splitter- the splitter value- Returns:
- the result of joinWords
-