Record Class CodeCell
java.lang.Object
java.lang.Record
smile.util.ipynb.CodeCell
- Record Components:
id- the unique cell identifier (required in nbformat 5).metadata- the cell-level metadata.source- the source code of the cell.outputs- the list of outputs produced by executing the cell.executionCount- the prompt number;nullif the cell has never been executed.
- All Implemented Interfaces:
Cell
public record CodeCell(String id, CellMetadata metadata, MultilineString source, List<Output> outputs, Integer executionCount)
extends Record
implements Cell
A code cell. Code cells contain executable source code in the kernel language
and may carry a list of outputs generated during execution.
The id field is required in nbformat 5 (nbformat_minor ≥ 4).
-
Constructor Summary
ConstructorsConstructorDescriptionCodeCell(String id, CellMetadata metadata, MultilineString source, List<Output> outputs, Integer executionCount) Creates an instance of aCodeCellrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncellType()Returns the cell type identifier.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexecutionCountrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.metadata()Returns the value of themetadatarecord component.outputs()Returns the value of theoutputsrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CodeCell
public CodeCell(String id, CellMetadata metadata, MultilineString source, List<Output> outputs, Integer executionCount) Creates an instance of aCodeCellrecord class.- Parameters:
id- the value for theidrecord componentmetadata- the value for themetadatarecord componentsource- the value for thesourcerecord componentoutputs- the value for theoutputsrecord componentexecutionCount- the value for theexecutionCountrecord component
-
-
Method Details
-
cellType
-
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). -
id
-
metadata
Returns the value of themetadatarecord component. -
source
Returns the value of thesourcerecord component. -
outputs
-
executionCount
Returns the value of theexecutionCountrecord component.- Returns:
- the value of the
executionCountrecord component
-