Class CasedString
java.lang.Object
org.apache.rat.utils.CasedString
Handles converting from one string case to another (e.g. camel case to snake case).
- Since:
- 0.17
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe definition of a String case. -
Constructor Summary
ConstructorsConstructorDescriptionCasedString(CasedString.StringCase stringCase, String string) Creates a cased string by parsing the string argument for the specific case.CasedString(CasedString.StringCase stringCase, String[] segments) Creates a cased string of the specified case and segments -
Method Summary
Modifier and TypeMethodDescriptionas(CasedString.StringCase stringCase) Converts this cased string into another format.booleanString[]Gets the segments of this cased string.inthashCode()toCase(CasedString.StringCase stringCase) Generates a string from this cased string but with the desired case.toString()
-
Constructor Details
-
CasedString
Creates a cased string by parsing the string argument for the specific case.- Parameters:
stringCase- the case of the string being parsed.string- the string to parse.
-
CasedString
Creates a cased string of the specified case and segments- Parameters:
stringCase- the case of the string.segments- the segments of the string.
-
-
Method Details
-
as
Converts this cased string into another format.- Parameters:
stringCase- the desired format.- Returns:
- the new CasedString.
-
getSegments
Gets the segments of this cased string.- Returns:
- the segments of this cased string.
-
toCase
Generates a string from this cased string but with the desired case.- Parameters:
stringCase- the desired case.- Returns:
- this cased string in the desired case.
-
toString
-
equals
-
hashCode
-