IntHierarchicalRenderer

com.phasmidsoftware.tableparser.core.render.HierarchicalRenderer.IntHierarchicalRenderer
See theIntHierarchicalRenderer companion trait

Implicit object IntHierarchicalRenderer provides a default implementation of the IntHierarchicalRenderer trait, which extends the UntaggedHierarchicalRenderer type class for the Int type, enabling hierarchical rendering operations for Int values. This object acts as a companion and offers concrete behavior for rendering integers hierarchically.

The purpose of this renderer is to support type-safe and composable rendering of Int values in contexts where hierarchical data needs to be processed. The implementation is expected to define how integers are transformed or rendered in a hierarchical structure.

Usage: By being an implicit object, IntHierarchicalRenderer is automatically available wherever an IntHierarchicalRenderer instance is required implicitly. Users can this behavior by creating their own instances if a customized implementation is needed.

Example:

 // Assuming a hierarchical rendering context
 val result = someHierarchicalRenderingMethod(42) // Uses IntHierarchicalRenderer implicitly

Attributes

Companion
trait
Graph
Supertypes
trait Renderer[Int, Node]
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Inherited methods

def asString(t: Int): String

Method to render content as a String. This method is invoked only when T is not a Product, sequence or Option. Normally, the default method is what is required, but it might be necessary to override in some situations. This method does not apply to style or attribute values.

Method to render content as a String. This method is invoked only when T is not a Product, sequence or Option. Normally, the default method is what is required, but it might be necessary to override in some situations. This method does not apply to style or attribute values.

Value parameters

t

the content value.

Attributes

Returns

a String corresponding to t.

Inherited from:
HierarchicalRenderer
def render(t: Int, attrs: Map[String, String]): Node

Render an instance of T as a U.

Render an instance of T as a U.

Value parameters

attrs

a map of attributes for this value of U.

t

the input parameter, i.e. the object to be rendered.

Attributes

Returns

a new instance of U.

Inherited from:
UntaggedHierarchicalRenderer
def render(t: Int): Node

Render an instance of T as an O, qualifying the rendering with no attributes.

Render an instance of T as an O, qualifying the rendering with no attributes.

Value parameters

t

a T to be rendered.

Attributes

Returns

an instance of type O.

Inherited from:
Renderer

Inherited fields

val baseAttrs: Map[String, String]

Defines the base attribute set for type T.

Defines the base attribute set for type T.

Attributes

Inherited from:
HierarchicalRenderer
val style: String

Defines the default style for type T.

Defines the default style for type T.

Attributes

Inherited from:
UntaggedHierarchicalRenderer