CaseAccessor
, CaseAccessor.CaseBuilder<CaseStyleBuilder>
, CaseAccessor.CaseMutator
, CaseAccessor.CaseProperty
, org.refcodes.mixin.TextAccessor
, org.refcodes.mixin.TextAccessor.TextBuilder<CaseStyleBuilder>
, org.refcodes.mixin.TextAccessor.TextMutator
, org.refcodes.mixin.TextAccessor.TextProperty
CaseStyleBuilderImpl
public interface CaseStyleBuilder extends org.refcodes.mixin.TextAccessor.TextProperty, org.refcodes.mixin.TextAccessor.TextBuilder<CaseStyleBuilder>, CaseAccessor.CaseProperty, CaseAccessor.CaseBuilder<CaseStyleBuilder>
String
to the desired case.
The state of the Case
accessible via CaseAccessor.getCase()
has not an
effect on some of the methods. For example it has no effect on
toCamelCase()
, but it has an effect in toSnakeCase(String)
.CaseAccessor.CaseBuilder<B extends CaseAccessor.CaseBuilder<?>>, CaseAccessor.CaseMutator, CaseAccessor.CaseProperty
Modifier and Type | Method | Description |
---|---|---|
String |
toCamelCase() |
Converts the text as of
TextAccessor.getText() to camel-case ("camelCase"). |
String |
toCamelCase(String aKey) |
Converts the provided key as of
TextAccessor.getText() to camel-case
("camelCase"). |
String |
toKebabCase() |
Converts the key as of
TextAccessor.getText() to kebab-case, either in upper
case as of "KEBAB-CASE" or in lower-case as of "kebab-case", depending on
the Case property (as of CaseAccessor.CaseMutator.setCase(Case) and
CaseAccessor.getCase() ). |
String |
toKebabCase(String aKey) |
Converts the provided key as of
TextAccessor.getText() to kebab-case, either
in upper case as of "KEBAB-CASE" or in lower-case as of "kebab-case",
depending on the Case property (as of CaseAccessor.CaseMutator.setCase(Case) and
CaseAccessor.getCase() ). |
String |
toPascalCase() |
Converts the key as of
TextAccessor.getText() to pascal-case ("PascalCase"). |
String |
toPascalCase(String aKey) |
Converts the provided key as of
TextAccessor.getText() to pascal-case
("PascalCase"). |
String |
toSnakeCase() |
Converts the key as of
TextAccessor.getText() to snake-case, either in upper
case as of "SNAKE_CASE" or in lower-case as of "snake_case", depending on
the Case property (as of CaseAccessor.CaseMutator.setCase(Case) and
CaseAccessor.getCase() ). |
String |
toSnakeCase(String aKey) |
Converts the provided key as of
TextAccessor.getText() to snake-case, either
in upper case as of "SNAKE_CASE" or in lower-case as of "snake_case",
depending on the Case property (as of CaseAccessor.CaseMutator.setCase(Case) and
CaseAccessor.getCase() ). |
default CaseStyleBuilder |
withCase(Case aCase) |
Sets the rows
Case to use returns this builder as of the
Builder-Pattern. |
getCase
setCase
String toCamelCase()
TextAccessor.getText()
to camel-case ("camelCase").String toPascalCase()
TextAccessor.getText()
to pascal-case ("PascalCase").String toSnakeCase()
TextAccessor.getText()
to snake-case, either in upper
case as of "SNAKE_CASE" or in lower-case as of "snake_case", depending on
the Case
property (as of CaseAccessor.CaseMutator.setCase(Case)
and
CaseAccessor.getCase()
).String toKebabCase()
TextAccessor.getText()
to kebab-case, either in upper
case as of "KEBAB-CASE" or in lower-case as of "kebab-case", depending on
the Case
property (as of CaseAccessor.CaseMutator.setCase(Case)
and
CaseAccessor.getCase()
).String toCamelCase(String aKey)
TextAccessor.getText()
to camel-case
("camelCase").aKey
- The key to be converted.String toPascalCase(String aKey)
TextAccessor.getText()
to pascal-case
("PascalCase").aKey
- The key to be converted.String toSnakeCase(String aKey)
TextAccessor.getText()
to snake-case, either
in upper case as of "SNAKE_CASE" or in lower-case as of "snake_case",
depending on the Case
property (as of CaseAccessor.CaseMutator.setCase(Case)
and
CaseAccessor.getCase()
).aKey
- The key to be converted.String toKebabCase(String aKey)
TextAccessor.getText()
to kebab-case, either
in upper case as of "KEBAB-CASE" or in lower-case as of "kebab-case",
depending on the Case
property (as of CaseAccessor.CaseMutator.setCase(Case)
and
CaseAccessor.getCase()
).aKey
- The key to be converted.default CaseStyleBuilder withCase(Case aCase)
Case
to use returns this builder as of the
Builder-Pattern.withCase
in interface CaseAccessor.CaseBuilder<CaseStyleBuilder>
aCase
- The Case
to be used when printing a row or the
header.CaseAccessor.CaseBuilder
instance to continue configuration.Copyright © 2018. All rights reserved.