Package de.gebit.integrity.string

## Class FormattedStringElement

- java.lang.Object
- - de.gebit.integrity.string.AbstractFormattedStringElement
  - - de.gebit.integrity.string.FormattedStringElement

-     public class FormattedStringElement
      extends AbstractFormattedStringElement

  This is the main element for `FormattedString`s. It consists of a plain String value, to which an arbitrary number of formatting flags can be applied.
  Author:
    Rene Schneider - initial API and implementation

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `FormattedStringElement.FormatFlag` | Several formatting choices for text.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FormattedStringElement​(String aText)` | Creates a new instance.
    `FormattedStringElement​(String aText, FormattedStringElement.FormatFlag... someFlags)` | Creates a new instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `List<FormattedStringElement.FormatFlag>` | `getFormatFlags()` |
    `String` | `toFormattedString()` | Returns the elements' contents as a String with all necessary formatting tokens.
    `String` | `toUnformattedString()` | Returns the elements' contents as a String without any formatting tokens.

    - ### Methods inherited from class de.gebit.integrity.string.AbstractFormattedStringElement

      `equals, hashCode`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FormattedStringElement

          public FormattedStringElement​(String aText)

      Creates a new instance.
      Parameters:
        `aText` - the string value

    - #### FormattedStringElement

          public FormattedStringElement​(String aText,
                                        FormattedStringElement.FormatFlag... someFlags)

      Creates a new instance.
      Parameters:
        `aText` - the string value
        `someFlags` - the formatting flags to apply

  - ### Method Detail

    - #### toUnformattedString

          public String toUnformattedString()

      Description copied from class: `AbstractFormattedStringElement`
      Returns the elements' contents as a String without any formatting tokens.
      Specified by:
        `toUnformattedString` in class `AbstractFormattedStringElement`
      Returns:
        the unformatted element contents

    - #### getFormatFlags

          public List<FormattedStringElement.FormatFlag> getFormatFlags()

    - #### toFormattedString

          public String toFormattedString()

      Description copied from class: `AbstractFormattedStringElement`
      Returns the elements' contents as a String with all necessary formatting tokens.
      Specified by:
        `toFormattedString` in class `AbstractFormattedStringElement`
      Returns:
        the formatted element contents