FormatText
FormatText is a case class that extends the functionality of BaseFormat for text-based formatting purposes. It provides mechanisms for handling hierarchical indentation, formatting class names within a rendering state, and generating sequences or enclosed structures based on an open/close state.
Value parameters
- indents
-
The number of initial indentation levels to apply.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass BaseFormattrait Formatclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Formats the name of a class or type based on the provided StateR instance and an optional open/close state.
Formats the name of a class or type based on the provided StateR instance and an optional open/close state.
Type parameters
- T
-
The type whose class name is being formatted, used in conjunction with
StateR.
Value parameters
- open
-
An optional boolean indicating whether to open (
true), close (false), or perform no action (None). - stateR
-
The current rendering state (
StateR), which may include the name or other attributes used for formatting.
Attributes
- Returns
-
A formatted string representing the class name, including any open or close indicators based on the
openparameter.
Increases the indentation level by one.
Increases the indentation level by one.
Attributes
- Returns
-
A new
Formatinstance with the updated indentation level.
Generates a sequence delimiter based on the provided optional boolean value.
Generates a sequence delimiter based on the provided optional boolean value.
Value parameters
- open
-
An optional boolean indicating the type of delimiter:
Some(true)returns an opening bracket "[",Some(false)returns a closing bracket "]", andNonereturns a newline character.
Attributes
- Returns
-
A string representing the appropriate delimiter based on the input.
Inherited methods
Retrieves the default delimiter used for separating elements in formatted content.
Retrieves the default delimiter used for separating elements in formatted content.
Attributes
- Returns
-
A
Stringrepresenting the default delimiter, typically a comma followed by a space (", "). - Inherited from:
- Format
Returns this Format unaffected..
Returns this Format unaffected..
Attributes
- Returns
-
The current
Formatinstance, representing the flat version of the format. - Inherited from:
- BaseFormat
Generates a newline character followed by a string of spaces based on the current indent level. The indentation is determined by the number of indents multiplied by a predefined tab unit.
Generates a newline character followed by a string of spaces based on the current indent level. The indentation is determined by the number of indents multiplied by a predefined tab unit.
Attributes
- Returns
-
A formatted string consisting of a newline character followed by the appropriate level of indentation.
- Inherited from:
- BaseFormat
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
Concrete fields
The name of the format, specifically associated with this formatter. name represents the type of the formatter and is initialized as "FormatText".
The name of the format, specifically associated with this formatter. name represents the type of the formatter and is initialized as "FormatText".