Interface StructureRenderer

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

Renders a Structure (a list, block or table produced by ul, ol, block or table) for one destination.

The renderer owns the encoding of its content: it must encode every item and cell it writes and must not encode the markup it adds. The value encoder of the render is not applied to a Structure. A nested Structure item is rendered by calling this renderer again.

  • Method Details

    • render

      String render(Structure structure, Function<Object,String> toText)
      Renders a structure.
      Parameters:
      structure - The structure. Never null.
      toText - Converts one item or cell value to text using the resolver's value formatter (before encoding).
      Returns:
      The rendered text. Never null.