Package org.refcodes.textual
Interface TextLineBuilder
-
- All Superinterfaces:
org.refcodes.mixin.ColumnWidthAccessor
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<TextLineBuilder>
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
- All Known Implementing Classes:
TextLineBuilderImpl
public interface TextLineBuilder extends org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<TextLineBuilder>, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
Creates a text line with the given character and width. In conjunction with theSystemUtility.getTerminalWidth()
method, you can create lines consuming the full width of your terminal.
-
-
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
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static TextLineBuilder
build()
This is a convenience method for easily instantiating the according builder.char
getLineChar()
Retrieves the line char from the line char property.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.default String
toString(int aLength, char aFillChar)
Returns aString
with the given length and containing only the provided fill character.default TextLineBuilder
withLineChar(char aLineChar)
Sets the line char for the line char property.
-
-
-
Method Detail
-
getLineChar
char getLineChar()
Retrieves the line char from the line char property.- Returns:
- The line char stored by the line char property.
-
setLineChar
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
default 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
String toString()
TheString
being build by the builder upon the settings of the attributes.
-
toString
default String toString(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.
-
build
static TextLineBuilder build()
This is a convenience method for easily instantiating the according builder.- Returns:
- an instance (using a default implementation) of this builder
-
-