Class CaseStyleBuilderImpl

    • Constructor Detail

      • CaseStyleBuilderImpl

        public CaseStyleBuilderImpl​()
    • Method Detail

      • getText

        public java.lang.String getText​()
        Specified by:
        getText in interface org.refcodes.mixin.TextAccessor
      • setText

        public void setText​(java.lang.String aText)
        Specified by:
        setText in interface org.refcodes.mixin.TextAccessor.TextMutator
      • withText

        public CaseStyleBuilder withText​(java.lang.String aText)
        Specified by:
        withText in interface org.refcodes.mixin.TextAccessor.TextBuilder<CaseStyleBuilder>
      • getCase

        public Case getCase​()
        Gets the currently set Case being used.
        Specified by:
        getCase in interface CaseAccessor
        Returns:
        The currently configured Cases.
      • toCamelCase

        public java.lang.String toCamelCase​()
        Converts the text as of TextAccessor.getText() to camel-case ("camelCase").
        Specified by:
        toCamelCase in interface CaseStyleBuilder
        Returns:
        The camel-case representation of the according key.
      • toPascalCase

        public java.lang.String toPascalCase​()
        Converts the key as of TextAccessor.getText() to pascal-case ("PascalCase").
        Specified by:
        toPascalCase in interface CaseStyleBuilder
        Returns:
        The camel-case representation of the according key.
      • toCamelCase

        public java.lang.String toCamelCase​(java.lang.String aText)
        Converts the provided key as of TextAccessor.getText() to camel-case ("camelCase").
        Specified by:
        toCamelCase in interface CaseStyleBuilder
        Parameters:
        aText - The key to be converted.
        Returns:
        The camel-case representation of the according key.
      • toSnakeCase

        public java.lang.String toSnakeCase​(java.lang.String aText)
        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()).
        Specified by:
        toSnakeCase in interface CaseStyleBuilder
        Parameters:
        aText - The key to be converted.
        Returns:
        The snake-case representation of the according key.
      • toPascalCase

        public java.lang.String toPascalCase​(java.lang.String aText)
        Converts the provided key as of TextAccessor.getText() to pascal-case ("PascalCase").
        Specified by:
        toPascalCase in interface CaseStyleBuilder
        Parameters:
        aText - The key to be converted.
        Returns:
        The pascal-case representation of the according key.
      • toKebabCase

        public java.lang.String toKebabCase​(java.lang.String aText)
        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()).
        Specified by:
        toKebabCase in interface CaseStyleBuilder
        Parameters:
        aText - The key to be converted.
        Returns:
        The kebab-case representation of the according key.