Package de.gebit.integrity.utils

## Class CountsOfThingsStringJoiner.StringSegment

- java.lang.Object
- - de.gebit.integrity.utils.CountsOfThingsStringJoiner.StringSegment

- Enclosing class:
    CountsOfThingsStringJoiner

      public static class CountsOfThingsStringJoiner.StringSegment
      extends Object

  Represents a string segment of this joiner.
  Author:
    Rene Schneider - initial API and implementation

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `StringSegment​(CountsOfThingsStringJoiner.StringSegment aSegmentToClone, boolean aReplaceDividerFlag)` | Private constructor, used to clone segments.
    `` | `StringSegment​(String aContent, Boolean aDividerFlag, Object aDataObject)` | Constructs an instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getContent()` |
    `Object` | `getData()` |
    `String` | `getDivider()` | Gets the divider as string to use (if any).
    `CountsOfThingsStringJoiner.StringSegment` | `getNextSegment()` |
    `CountsOfThingsStringJoiner.StringSegment` | `getPreviousSegment()` |
    `boolean` | `hasDivider()` | Whether this segment has a divider at all.
    `boolean` | `hasLastDivider()` | Whether this segment begins with the last-segment divider.
    `boolean` | `hasStandardDivider()` | Whether this segment begins with the standard divider.
    `protected void` | `setNextSegment​(CountsOfThingsStringJoiner.StringSegment aSegment)` | Sets the next segment.
    `protected void` | `setPreviousSegment​(CountsOfThingsStringJoiner.StringSegment aSegment)` | Sets the previous segment.
    `String` | `toString()` |

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### StringSegment

          public StringSegment​(String aContent,
                               Boolean aDividerFlag,
                               Object aDataObject)

      Constructs an instance.
      Parameters:
        `aContent` -
        `aDivider` -
        `aDataObject` -

    - #### StringSegment

          protected StringSegment​(CountsOfThingsStringJoiner.StringSegment aSegmentToClone,
                                  boolean aReplaceDividerFlag)

      Private constructor, used to clone segments.
      Parameters:
        `aSegmentToClone` -
        `aReplaceDividerFlag` -
        `aPreviousSegment` -
        `aNextSegment` -

  - ### Method Detail

    - #### setPreviousSegment

          protected void setPreviousSegment​(CountsOfThingsStringJoiner.StringSegment aSegment)

      Sets the previous segment.
      Parameters:
        `aSegment` -

    - #### setNextSegment

          protected void setNextSegment​(CountsOfThingsStringJoiner.StringSegment aSegment)

      Sets the next segment.
      Parameters:
        `aSegment` -

    - #### getContent

          public String getContent()

    - #### getDivider

          public String getDivider()

      Gets the divider as string to use (if any).
      Returns:

    - #### getData

          public Object getData()

    - #### getPreviousSegment

          public CountsOfThingsStringJoiner.StringSegment getPreviousSegment()

    - #### getNextSegment

          public CountsOfThingsStringJoiner.StringSegment getNextSegment()

    - #### hasDivider

          public boolean hasDivider()

      Whether this segment has a divider at all.
      Returns:

    - #### hasStandardDivider

          public boolean hasStandardDivider()

      Whether this segment begins with the standard divider.
      Returns:

    - #### hasLastDivider

          public boolean hasLastDivider()

      Whether this segment begins with the last-segment divider.
      Returns:

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`