com.phasmidsoftware.tableparser.core.render
HierarchicalRenderer
Companion trait HierarchicalRenderer
object HierarchicalRenderer
Object HierarchicalRenderer provides a collection of implicit instances
and type definitions for the UntaggedHierarchicalRenderer trait, allowing
for hierarchical serialization of various primitive and common types such as
String, Boolean, Int, Long, BigInt, Double, and LocalDate.
These implicit objects define how to render instances of their respective
types into a hierarchical structure (Node) by extending the generic
UntaggedHierarchicalRenderer which implements the HierarchicalRenderer
interface.
- Alphabetic
- By Inheritance
- HierarchicalRenderer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait BigIntHierarchicalRenderer extends UntaggedHierarchicalRenderer[BigInt]
A type class responsible for rendering instances of
BigIntin a hierarchical structure without additional tagging or specific rendering formats.A type class responsible for rendering instances of
BigIntin a hierarchical structure without additional tagging or specific rendering formats.This trait extends the functionality provided by
UntaggedHierarchicalRenderer, specifically for the typeBigInt. It inherits the capability of rendering hierarchical structures while allowing attributes for customization.Since it extends
UntaggedHierarchicalRenderer, it provides arendermethod to convert aBigIntinstance into aNoderepresentation while factoring in additional attributes and style information predefined inUntaggedHierarchicalRenderer.Example usage:
implicit object BigIntHierarchicalRenderer extends BigIntHierarchicalRenderer val bigIntInstance: BigInt = BigInt(12345) val renderedNode: Node = BigIntHierarchicalRenderer.render(bigIntInstance, Map("attr1" -> "value1")) println(renderedNode) // Node(style, Some("12345"), Map("attr1" -> "value1"))
- See also
UntaggedHierarchicalRenderer for more details regarding the rendering framework.
- trait BooleanHierarchicalRenderer extends UntaggedHierarchicalRenderer[Boolean]
Trait
BooleanHierarchicalRendererextends theUntaggedHierarchicalRendererfor handling Boolean types.Trait
BooleanHierarchicalRendererextends theUntaggedHierarchicalRendererfor handling Boolean types.This trait provides rendering capabilities for Boolean values, which involve rendering them into a structured format while potentially applying additional attributes or styles. It serves as a type-specific implementation for rendering Boolean values in a hierarchical model.
The style associated with the rendering can be customized, and attributes can be passed to the
rendermethod for finer control over the rendered output.Type Parameters
None, as this is specifically defined for the
Booleantype.Inheritance
This trait inherits from
UntaggedHierarchicalRenderer, leveraging the base rendering functionality provided by that trait while specializing it for Boolean types.Usage
This trait is typically used where hierarchical rendering of Boolean values is required, such as in contexts involving nested or tree-like data structures.
An implicit instance of this trait is available, enabling seamless use in generic code that requires an implicit renderer for type Boolean.
- See also
UntaggedHierarchicalRenderer
HierarchicalRenderer
- trait DoubleHierarchicalRenderer extends UntaggedHierarchicalRenderer[Double]
Trait
DoubleHierarchicalRendererextends theUntaggedHierarchicalRendererto provide rendering capabilities specifically for objects of typeDoublein a hierarchical structure.Trait
DoubleHierarchicalRendererextends theUntaggedHierarchicalRendererto provide rendering capabilities specifically for objects of typeDoublein a hierarchical structure.This trait is used to define how instances of
Doublecan be represented in a hierarchical format, inheriting the basic behavior and methods from theUntaggedHierarchicalRenderertype class.Key Features: - Automatic support for rendering
Doubleobjects in a hierarchical layout. - Includes rendering functionality inherited fromUntaggedHierarchicalRenderer, such as therendermethod. - Provides a default styling structure through thestyleproperty inherited from the parent trait.This trait simplifies the customization and usage of hierarchical renderers specific to the
Doubletype and can be utilized as part of a rendering pipeline where structured data representations are needed.- See also
UntaggedHierarchicalRenderer for more details on the base functionality.
- trait IntHierarchicalRenderer extends UntaggedHierarchicalRenderer[Int]
A trait for rendering instances of type
Intin a hierarchical structure, extending theUntaggedHierarchicalRendererfunctionality tailored for theInttype.A trait for rendering instances of type
Intin a hierarchical structure, extending theUntaggedHierarchicalRendererfunctionality tailored for theInttype.This trait provides a framework for rendering integers with an associated set of attributes, potentially styled through the
styleproperty inherited from its parent trait.The
IntHierarchicalRenderercan be utilized as a part of a broader rendering pipeline where structured (hierarchical) representation of data is required. This trait acts as the specific renderer forIntvalues, leveraging mechanisms defined in its supertype.- See also
UntaggedHierarchicalRenderer for further details around the rendering process and expected behavior of methods like
render.
- trait LocalDateHierarchicalRenderer extends UntaggedHierarchicalRenderer[LocalDate]
Trait
LocalDateHierarchicalRendereris a specialized implementation of theUntaggedHierarchicalRendererfor rendering instances ofLocalDatein a hierarchical structured format.Trait
LocalDateHierarchicalRendereris a specialized implementation of theUntaggedHierarchicalRendererfor rendering instances ofLocalDatein a hierarchical structured format. It provides a mechanism to renderLocalDateobjects as nodes with additional attributes.This trait inherits the rendering capabilities from
UntaggedHierarchicalRenderer[LocalDate], which is designed for rendering objects of a specific type while supporting custom attributes and style.Example usage:
implicit object MyLocalDateRenderer extends LocalDateHierarchicalRenderer val renderedNode: Node = MyLocalDateRenderer.render(LocalDate.now, Map("key" -> "value"))
- See also
UntaggedHierarchicalRenderer for the base trait and its methods.
- trait LongHierarchicalRenderer extends UntaggedHierarchicalRenderer[Long]
Trait
LongHierarchicalRendererextendsUntaggedHierarchicalRendererspecifically for rendering hierarchical structures of typeLong.Trait
LongHierarchicalRendererextendsUntaggedHierarchicalRendererspecifically for rendering hierarchical structures of typeLong. It provides a framework to transform instances ofLonginto a node-based hierarchical representation, leveraging the untagged style rendering provided by the parent trait.This trait does not define any additional members or behavior itself but inherits from
UntaggedHierarchicalRenderer, usingLongas the predefined type parameter.- See also
UntaggedHierarchicalRenderer
- trait StringHierarchicalRenderer extends UntaggedHierarchicalRenderer[String]
A type class that provides functionality to render hierarchical data as strings.
A type class that provides functionality to render hierarchical data as strings.
The
StringHierarchicalRenderertrait extends theUntaggedHierarchicalRendererspecifically for rendering data where the rendered output is of typeString. This trait is the foundation for constructing string-based hierarchical renderings within a rendering framework.It inherits the capabilities from
UntaggedHierarchicalRenderer[String], where: - It allows objects of typeTto be systematically converted into a string format with optional attributes that define characteristics of rendering. - It contains a defaultstyleattribute that can be used when rendering (defaults to an empty string).By using
StringHierarchicalRenderer, developers can define ways to represent data objects hierarchically in string form, while benefiting from shared behavior in theUntaggedHierarchicalRendererparent trait.- See also
UntaggedHierarchicalRenderer
HierarchicalRenderer
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- implicit object BigIntHierarchicalRenderer extends BigIntHierarchicalRenderer
Implicit object for rendering
BigIntinstances hierarchically.Implicit object for rendering
BigIntinstances hierarchically.This object extends the
BigIntHierarchicalRenderertrait, which itself is a specialized implementation of theUntaggedHierarchicalRendererforBigInt. It serves as an implicit instance to provide hierarchical rendering functionality for theBigInttype.The hierarchical rendering defined by this object facilitates representing
BigIntvalues in structured or nested formats, which may be used for serialization, visualization, or other purposes in applications requiring hierarchical representations.Usage Example:
import com.example.renderers.BigIntHierarchicalRenderer val bigIntValue: BigInt = BigInt("12345678901234567890") val renderedOutput = someRenderingMethod(bigIntValue) // Uses BigIntHierarchicalRenderer implicitly println(renderedOutput)
- implicit object BooleanHierarchicalRenderer extends BooleanHierarchicalRenderer
An implicit object for rendering Boolean values in a hierarchical structure.
An implicit object for rendering Boolean values in a hierarchical structure.
BooleanHierarchicalRendereris an instance of theBooleanHierarchicalRenderertrait, which provides support for rendering Boolean values by adhering to theUntaggedHierarchicalRenderercontract. It allows for consistent and structured formatting of Boolean data to fit into a hierarchical rendering context.This implicit instance can be automatically utilized wherever a
BooleanHierarchicalRendereris required, making it easier to work with Boolean rendering across hierarchical structures without the need for explicitly defining renderers. - implicit object DoubleHierarchicalRenderer extends DoubleHierarchicalRenderer
Implicit object providing a default implementation of
DoubleHierarchicalRenderer.Implicit object providing a default implementation of
DoubleHierarchicalRenderer.The
DoubleHierarchicalRendereris an implicit, singleton object that serves as a type class instance for renderingDoublevalues in a hierarchical structure. It extends theDoubleHierarchicalRenderertrait, which itself extendsUntaggedHierarchicalRenderer[Double]. This ensures that the object integrates into systems utilizing theHierarchicalRenderertype class framework.This implicit object allows seamless rendering of
Doublevalues when a hierarchical rendering type class is required in the context ofHierarchicalRenderer. - implicit object IntHierarchicalRenderer extends IntHierarchicalRenderer
Implicit object
IntHierarchicalRendererprovides a default implementation of theIntHierarchicalRenderertrait, which extends theUntaggedHierarchicalRenderertype class for theInttype, enabling hierarchical rendering operations forIntvalues.Implicit object
IntHierarchicalRendererprovides a default implementation of theIntHierarchicalRenderertrait, which extends theUntaggedHierarchicalRenderertype class for theInttype, enabling hierarchical rendering operations forIntvalues. 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
Intvalues 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,
IntHierarchicalRendereris automatically available wherever anIntHierarchicalRendererinstance 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
- implicit object LocalDateHierarchicalRenderer extends LocalDateHierarchicalRenderer
Implicit object
LocalDateHierarchicalRendererfor renderingLocalDatein a hierarchical structure.Implicit object
LocalDateHierarchicalRendererfor renderingLocalDatein a hierarchical structure.This object extends the
LocalDateHierarchicalRenderertrait, which specializesUntaggedHierarchicalRendererfor rendering instances ofLocalDate. It provides type class support for hierarchical rendering ofLocalDateobjects.The rendering mechanism provided by this implicit object ensures that
LocalDateinstances are converted into a hierarchical representation that aligns with the expected structure defined by its associated renderer type class.This implicit is typically used for cases where
LocalDaterepresentation as part of a larger heterogeneous data structure needs to be rendered in a textual or hierarchical format that aligns withUntaggedHierarchicalRenderersemantics.Usage: Simply ensure
LocalDateHierarchicalRendereris in scope when renderingLocalDatewithin a hierarchical context, and the appropriate rendering implementation will be picked up implicitly.Example:
import LocalDateHierarchicalRenderer._ val localDate: LocalDate = LocalDate.of(2023, 10, 15) val rendered = implicitly[LocalDateHierarchicalRenderer].render(localDate, Map.empty) println(rendered) // Outputs the hierarchical representation of the LocalDate
- implicit object LongHierarchicalRenderer extends LongHierarchicalRenderer
Implicit object for rendering
Longvalues in a hierarchical manner.Implicit object for rendering
Longvalues in a hierarchical manner.This object provides an implicit instance of
LongHierarchicalRenderertrait to renderLongtype values in a structured, hierarchical format. The specific rendering behavior is defined within theLongHierarchicalRenderertrait.Usage: Implicitly used in contexts where a
Longtype value needs to be serialized or represented hierarchically. - implicit object StringHierarchicalRenderer extends StringHierarchicalRenderer
Implicit object for rendering hierarchical structures as strings.
Implicit object for rendering hierarchical structures as strings.
The
StringHierarchicalRendererprovides an implicit instance of theStringHierarchicalRenderertype class, allowing hierarchical data structures to be rendered into a string format. This is useful for cases where hierarchical data needs to be displayed, logged, or processed in textual form.A
StringHierarchicalRendereris a subtype ofUntaggedHierarchicalRenderer[String], enabling the rendering of hierarchy data without requiring specific type tags.Usage: By importing this implicit object into scope, you can provide a default mechanism for string-based hierarchical rendering for types supporting the
StringHierarchicalRenderertrait.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)