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 TypeMethodDescriptiondefault HTMLConvertablecopy()Creates a deep copy of this HTMLConvertable.Creates a deep copy of this HTMLConvertable element, preserving the element's structure while substituting text content using the provided translation mapping.default StringtoHTML()Converts the object to an HTML string.Converts the object to an HTML string.
-
Method Details
-
toHTML
Converts the object to an HTML string.- Returns:
- the HTML representation of the object
-
toHTML
Converts the object to an HTML string.- Parameters:
outStrings- set of unique strings of text content- Returns:
-
copy
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 bytoHTML(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
Creates a deep copy of this HTMLConvertable.- Returns:
- new independent copy of this HTMLConvertable instance
-