Record Class ExecuteResultOutput

java.lang.Object
java.lang.Record
smile.util.ipynb.ExecuteResultOutput
Record Components:
executionCount - the cell execution counter at the time the output was produced.
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 ExecuteResultOutput(Integer executionCount, 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
An execute-result output (output type "execute_result").

This is the result of evaluating an expression and is similar to DisplayDataOutput but also carries the execution_count (prompt number) that links the output back to its code cell.

  • Constructor Details

    • ExecuteResultOutput

      public ExecuteResultOutput(Integer executionCount, 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 a ExecuteResultOutput record class.
      Parameters:
      executionCount - the value for the executionCount record component
      data - the value for the data record component
      metadata - the value for the metadata record component
      transientData - the value for the transientData record component
  • Method Details

    • outputType

      public String outputType()
      Description copied from interface: Output
      Returns the output type identifier.
      Specified by:
      outputType in interface Output
      Returns:
      one of "stream", "display_data", "execute_result", or "error".
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • executionCount

      public Integer executionCount()
      Returns the value of the executionCount record component.
      Returns:
      the value of the executionCount record component
    • data

      public Map<String, tools.jackson.databind.JsonNode> data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • metadata

      public Map<String, tools.jackson.databind.JsonNode> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component
    • transientData

      public Map<String, tools.jackson.databind.JsonNode> transientData()
      Returns the value of the transientData record component.
      Returns:
      the value of the transientData record component