Interface HTMLConvertable

All Known Implementing Classes:
HTMLBarChart, HTMLChart, HTMLContent, HTMLFragment, HTMLHeader, HTMLHeatmapChart, HTMLHistogramChart, HTMLImage, HTMLLineChart, HTMLLink, HTMLLinkAction, HTMLPage, HTMLTable, HTMLTableFromUITable, HTMLTag, HTMLTextBlock, HTMLTimeLineChart

public interface HTMLConvertable
The HTMLConvertable interface defines a method for converting an object to its HTML representation. Classes implementing this interface must provide an implementation for the toHTML() method.
Author:
Alexey Glazyrin
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a deep copy of this HTMLConvertable.
    copy(Map<String,String> stringsSubstitutionMap)
    Creates a deep copy of this HTMLConvertable element, preserving the element's structure while substituting text content using the provided translation mapping.
    default String
    Converts the object to an HTML string.
    toHTML(Set<String> outStrings)
    Converts the object to an HTML string.
  • Method Details

    • toHTML

      default String toHTML()
      Converts the object to an HTML string.
      Returns:
      the HTML representation of the object
    • toHTML

      String toHTML(Set<String> outStrings)
      Converts the object to an HTML string.
      Parameters:
      outStrings - set of unique strings of text content
      Returns:
    • copy

      HTMLConvertable copy(Map<String,String> stringsSubstitutionMap)
      Creates a deep copy of this HTMLConvertable element, preserving the element's structure while substituting text content using the provided translation mapping.
      Parameters:
      stringsSubstitutionMap - a map where keys are original text strings (as collected by toHTML(Set)) and values are their translations. During copying, any encountered text content present in this map will be replaced with its translated version.
      Returns:
      a new independent copy of this HTMLConvertable instance with translated content
    • copy

      default HTMLConvertable copy()
      Creates a deep copy of this HTMLConvertable.
      Returns:
      new independent copy of this HTMLConvertable instance