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
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
asString
(int aLength, char aFillChar) Returns aString
with the given length and containing only the provided fill character.int
char
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.toString()
TheString
being build by the builder upon the settings of the attributes.withColumnWidth
(int aColumnWidth) withLineChar
(char aLineChar) Sets the line char for the line char property.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
letColumnWidth
-
Constructor Details
-
TextLineBuilder
public TextLineBuilder()
-
-
Method Details
-
withColumnWidth
- 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
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
TheString
being build by the builder upon the settings of the attributes. -
asString
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.
-