Class 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
    • Constructor Detail

      • TextLineBuilder

        public TextLineBuilder()
    • Method Detail

      • withColumnWidth

        public TextLineBuilder withColumnWidth​(int aColumnWidth)
        Specified by:
        withColumnWidth in interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<TextLineBuilder>
      • setColumnWidth

        public void setColumnWidth​(int aColumnWidth)
        Specified by:
        setColumnWidth in interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
      • getColumnWidth

        public int getColumnWidth()
        Specified by:
        getColumnWidth in interface org.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()
        The String being build by the builder upon the settings of the attributes.
        Overrides:
        toString in class Object
        Returns:
        The according resulting String
      • asString

        public static String asString​(int aLength,
                                      char aFillChar)
        Returns a String 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.