- java.lang.Object
-
- org.refcodes.textual.TextLineBuilder
-
- All Implemented Interfaces:
org.refcodes.mixin.ColumnWidthAccessor
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<TextLineBuilder>
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
public class TextLineBuilder extends Object implements org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<TextLineBuilder>, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
The Class TextLineBuilderImpl.- Author:
- steiner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ColumnWidthAccessor
org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<B extends org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<B>>, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
-
-
Constructor Summary
Constructors Constructor Description TextLineBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
asString(int aLength, char aFillChar)
Returns aString
with the given length and containing only the provided fill character.int
getColumnWidth()
char
getLineChar()
Retrieves the line char from the line char property.void
setColumnWidth(int aColumnWidth)
void
setLineChar(char aLineChar)
Sets the line char for the line char property.String
toString()
TheString
being build by the builder upon the settings of the attributes.TextLineBuilder
withColumnWidth(int aColumnWidth)
TextLineBuilder
withLineChar(char aLineChar)
Sets the line char for the line char property.
-
-
-
Method Detail
-
withColumnWidth
public TextLineBuilder withColumnWidth(int aColumnWidth)
- Specified by:
withColumnWidth
in interfaceorg.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<TextLineBuilder>
-
setColumnWidth
public void setColumnWidth(int aColumnWidth)
- Specified by:
setColumnWidth
in interfaceorg.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
-
getColumnWidth
public int getColumnWidth()
- Specified by:
getColumnWidth
in interfaceorg.refcodes.mixin.ColumnWidthAccessor
-
getLineChar
public char getLineChar()
Retrieves the line char from the line char property.- Returns:
- The line char stored by the line char property.
-
setLineChar
public void setLineChar(char aLineChar)
Sets the line char for the line char property.- Parameters:
aLineChar
- The line char to be stored by the line char property.
-
withLineChar
public TextLineBuilder withLineChar(char aLineChar)
Sets the line char for the line char property.- Parameters:
aLineChar
- The line char to be stored by the line char property.- Returns:
- The builder for applying multiple build operations.
-
toString
public String toString()
TheString
being build by the builder upon the settings of the attributes.
-
asString
public static String asString(int aLength, char aFillChar)
Returns aString
with the given length and containing only the provided fill character.- Parameters:
aLength
- The length to be reached.aFillChar
- The char to be used for filling up- Returns:
- The
String
filled with the fill character till the provided length.
-
-