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 -
Method Summary
Modifier and TypeMethodDescriptionstatic StringasString(int aLength, char aFillChar) Returns aStringwith the given length and containing only the provided fill character.intcharRetrieves the line char from the line char property.voidsetColumnWidth(int aColumnWidth) voidsetLineChar(char aLineChar) Sets the line char for the line char property.toString()TheStringbeing 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, waitMethods inherited from interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
letColumnWidth
-
Constructor Details
-
TextLineBuilder
public TextLineBuilder()
-
-
Method Details
-
withColumnWidth
- Specified by:
withColumnWidthin interfaceorg.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<TextLineBuilder>
-
setColumnWidth
public void setColumnWidth(int aColumnWidth) - Specified by:
setColumnWidthin interfaceorg.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
-
getColumnWidth
public int getColumnWidth()- Specified by:
getColumnWidthin 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
TheStringbeing build by the builder upon the settings of the attributes. -
asString
Returns aStringwith 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
Stringfilled with the fill character till the provided length.
-