Class TextLineBuilder

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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    asString(int aLength, char aFillChar)
    Returns a String 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.
    The String 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

      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.