Class CaseStyleBuilder

    • Constructor Detail

      • CaseStyleBuilder

        public CaseStyleBuilder()
    • Method Detail

      • getText

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

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

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

        public String toCamelCase()
        Converts the text as of getText() to camel-case ("camelCase").
        Returns:
        The camel-case representation of the according text.
      • toSnakeCase

        public String toSnakeCase()
        Converts the text as of 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 setCase(Case) and getCase()).
        Returns:
        The pascal-case representation of the according text.
      • toPascalCase

        public String toPascalCase()
        Converts the text as of getText() to pascal-case ("PascalCase").
        Returns:
        The camel-case representation of the according text.
      • toKebabCase

        public String toKebabCase()
        Converts the text as of 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 setCase(Case) and getCase()).
        Returns:
        The kebab-case representation of the according text.
      • toCamelCase

        public String toCamelCase​(String aText)
        Converts the provided text as of getText() to camel-case ("camelCase").
        Parameters:
        aText - The text to be converted.
        Returns:
        The camel-case representation of the according text.
      • toSnakeCase

        public String toSnakeCase​(String aText)
        Converts the provided text as of 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 setCase(Case) and getCase()).
        Parameters:
        aText - The text to be converted.
        Returns:
        The snake-case representation of the according text.
      • toPascalCase

        public String toPascalCase​(String aText)
        Converts the provided text as of getText() to pascal-case ("PascalCase").
        Parameters:
        aText - The text to be converted.
        Returns:
        The pascal-case representation of the according text.
      • toKebabCase

        public String toKebabCase​(String aText)
        Converts the provided text as of 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 setCase(Case) and getCase()).
        Parameters:
        aText - The text to be converted.
        Returns:
        The kebab-case representation of the according text.
      • asCamelCase

        public static String asCamelCase​(String aText)
        This method represents a shortcut for the instance method toCamelCase(String) though with default settings.
        Parameters:
        aText - The text to be converted.
        Returns:
        The camel-case representation of the according text.
      • asSnakeCase

        public static String asSnakeCase​(String aText)
        This method represents a shortcut for the instance method toSnakeCase(String) though with default settings.
        Parameters:
        aText - The text to be converted.
        Returns:
        The snake-case representation of the according text.
      • asSnakeCase

        public static String asSnakeCase​(String aText,
                                         Case aCase)
        This method represents a shortcut for the instance method toSnakeCase(String).
        Parameters:
        aText - The text to be converted.
        aCase - The case to use, either upper or lower.
        Returns:
        The snake-case representation of the according text.
      • asPascalCase

        public static String asPascalCase​(String aText)
        This method represents a shortcut for the instance method toPascalCase(String) though with default settings.
        Parameters:
        aText - The text to be converted.
        Returns:
        The pascal-case representation of the according text.
      • asKebabCase

        public static String asKebabCase​(String aText)
        This method represents a shortcut for the instance method toKebabCase(String) though with default settings.
        Parameters:
        aText - The text to be converted.
        Returns:
        The "kebab-case" representation of the according text.
      • asKebabCase

        public static String asKebabCase​(String aText,
                                         Case aCase)
        This method represents a shortcut for the instance method toKebabCase(String).
        Parameters:
        aText - The text to be converted.
        aCase - The case to use, either upper or lower.
        Returns:
        The "kebab-case" representation of the according text.