Package eu.bandm.tools.format.spi
Class SimpleFormatProvider
java.lang.Object
eu.bandm.tools.format.spi.SimpleFormatProvider
- All Implemented Interfaces:
FormatProvider<String>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a compound format object that concatenates the given elements horizontally with absolute indentation.Returns a compound format object that concatenates the given elements vertically.Returns a compound format object that concatenates the given elements horizontally with relative indentation.Returns a compound format object that concatenates the given elements first horizontally and then vertically.Returns a compound format object that concatenates the given elements either horizontally or vertically.Returns an atomic format object that displays the given string.space
(int width) Returns an atomic format object that displays breakable whitespace.
-
Constructor Details
-
SimpleFormatProvider
public SimpleFormatProvider()
-
-
Method Details
-
literal
Description copied from interface:FormatProvider
Returns an atomic format object that displays the given string.If the given string contains whitespace, that will not be considered for line breaks.
- Specified by:
literal
in interfaceFormatProvider<String>
- Parameters:
text
- the string to display- Returns:
- an atomic format object that displays the given string
-
space
Description copied from interface:FormatProvider
Returns an atomic format object that displays breakable whitespace.- Specified by:
space
in interfaceFormatProvider<String>
- Parameters:
width
- the number of whitespace characters to display- Returns:
- an atomic format object that displays breakable whitespace of the given width
-
append
Description copied from interface:FormatProvider
Returns a compound format object that concatenates the given elements horizontally with absolute indentation.- Specified by:
append
in interfaceFormatProvider<String>
- Parameters:
elems
- the format subobjects to concatenate- Returns:
- a concatenated compound format object
-
beside
Description copied from interface:FormatProvider
Returns a compound format object that concatenates the given elements horizontally with relative indentation.- Specified by:
beside
in interfaceFormatProvider<String>
- Parameters:
elems
- the format subobjects to concatenate- Returns:
- a concatenated compound format object
-
beneath
Description copied from interface:FormatProvider
Returns a compound format object that concatenates the given elements vertically.- Specified by:
beneath
in interfaceFormatProvider<String>
- Parameters:
elems
- the format subobjects to concatenate- Returns:
- a concatenated compound format object
-
line
Description copied from interface:FormatProvider
Returns a compound format object that concatenates the given elements either horizontally or vertically.- Specified by:
line
in interfaceFormatProvider<String>
- Parameters:
elems
- the format subobjects to concatenate- Returns:
- a concatenated compound format object
-
block
Description copied from interface:FormatProvider
Returns a compound format object that concatenates the given elements first horizontally and then vertically.- Specified by:
block
in interfaceFormatProvider<String>
- Parameters:
elems
- the format subobjects to concatenate- Returns:
- a concatenated compound format object
-