Package de.gebit.integrity.string

## Class FormatTokenElement

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

-     public class FormatTokenElement
      extends AbstractFormattedStringElement

  These `FormattedString` elements are intended to represent single formatting tokens which don't "wrap" a piece of text. Examples are line breaks or tabs.
  Author:
    Rene Schneider - initial API and implementation

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `FormatTokenElement.FormatTokenType` | The format token types represent the actual tokens which can be used to format a string.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FormatTokenElement​(FormatTokenElement.FormatTokenType aType)` | Creates a new instance.
    `FormatTokenElement​(FormatTokenElement.FormatTokenType aType, String aReplacement)` | Creates a new instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `FormatTokenElement.FormatTokenType` | `getType()` |
    `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

    - #### FormatTokenElement

          public FormatTokenElement​(FormatTokenElement.FormatTokenType aType)

      Creates a new instance.
      Parameters:
        `aType` - the token type

    - #### FormatTokenElement

          public FormatTokenElement​(FormatTokenElement.FormatTokenType aType,
                                    String aReplacement)

      Creates a new instance.
      Parameters:
        `aType` - the token type
        `aReplacement` - the replacement text

  - ### Method Detail

    - #### getType

          public FormatTokenElement.FormatTokenType getType()

    - #### 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

    - #### 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