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 protectedStringSegment(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 StringgetContent()ObjectgetData()StringgetDivider()Gets the divider as string to use (if any).CountsOfThingsStringJoiner.StringSegmentgetNextSegment()CountsOfThingsStringJoiner.StringSegmentgetPreviousSegment()booleanhasDivider()Whether this segment has a divider at all.booleanhasLastDivider()Whether this segment begins with the last-segment divider.booleanhasStandardDivider()Whether this segment begins with the standard divider.protected voidsetNextSegment(CountsOfThingsStringJoiner.StringSegment aSegment)Sets the next segment.protected voidsetPreviousSegment(CountsOfThingsStringJoiner.StringSegment aSegment)Sets the previous segment.StringtoString()
-
-
-
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:
-
-