Package eu.bandm.tools.format.spi
Interface FormatProvider<F>
- Type Parameters:
F
- the type of format objects to produce
- All Known Implementing Classes:
FormatProviderImpl
,FormatProxy
,FormatServer
public interface FormatProvider<F>
Implementations have the capability to produce pretty-printing
format objects.
-
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.
-
Method Details
-
literal
Returns an atomic format object that displays the given string.If the given string contains whitespace, that will not be considered for line breaks.
- Parameters:
text
- the string to display- Returns:
- an atomic format object that displays the given string
-
space
Returns an atomic format object that displays breakable whitespace.- Parameters:
width
- the number of whitespace characters to display- Returns:
- an atomic format object that displays breakable whitespace of the given width
-
append
Returns a compound format object that concatenates the given elements horizontally with absolute indentation.- Parameters:
elems
- the format subobjects to concatenate- Returns:
- a concatenated compound format object
-
beside
Returns a compound format object that concatenates the given elements horizontally with relative indentation.- Parameters:
elems
- the format subobjects to concatenate- Returns:
- a concatenated compound format object
-
beneath
Returns a compound format object that concatenates the given elements vertically.- Parameters:
elems
- the format subobjects to concatenate- Returns:
- a concatenated compound format object
-
line
Returns a compound format object that concatenates the given elements either horizontally or vertically.- Parameters:
elems
- the format subobjects to concatenate- Returns:
- a concatenated compound format object
-
block
Returns a compound format object that concatenates the given elements first horizontally and then vertically.- Parameters:
elems
- the format subobjects to concatenate- Returns:
- a concatenated compound format object
-