Record Class DisplayDataOutput
java.lang.Object
java.lang.Record
smile.util.ipynb.DisplayDataOutput
- Record Components:
data- the MIME-bundle mapping MIME types to their content.metadata- optional MIME-type-specific metadata.transientData- transient data not saved with the notebook (e.g. display ids).
- All Implemented Interfaces:
Output
public record DisplayDataOutput(Map<String, tools.jackson.databind.JsonNode> data, Map<String, tools.jackson.databind.JsonNode> metadata, Map<String, tools.jackson.databind.JsonNode> transientData)
extends Record
implements Output
A rich display-data output (output type
"display_data").
The data map is keyed by MIME type (e.g. "text/plain",
"text/html", "image/png") and the value is either a string
or an array of strings for multiline text, or a base64-encoded string for
binary formats such as images. The optional metadata map may carry
MIME-type-specific metadata (e.g. image dimensions).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.Returns the output type identifier.final StringtoString()Returns a string representation of this record class.Returns the value of thetransientDatarecord component.
-
Constructor Details
-
DisplayDataOutput
public DisplayDataOutput(Map<String, tools.jackson.databind.JsonNode> data, Map<String, tools.jackson.databind.JsonNode> metadata, Map<String, tools.jackson.databind.JsonNode> transientData) Creates an instance of aDisplayDataOutputrecord class.- Parameters:
data- the value for thedatarecord componentmetadata- the value for themetadatarecord componenttransientData- the value for thetransientDatarecord component
-
-
Method Details
-
outputType
Description copied from interface:OutputReturns the output type identifier.- Specified by:
outputTypein interfaceOutput- Returns:
- one of
"stream","display_data","execute_result", or"error".
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
data
-
metadata
-
transientData
Returns the value of thetransientDatarecord component.- Returns:
- the value of the
transientDatarecord component
-