blockly > Procedures > IParameterModel
Procedures.IParameterModel interface
A data model for a procedure.
Signature:
export interface IParameterModel
Methods
Method |
Description |
getId() |
Returns the unique language-neutral ID for the parameter. This represents the identify of the variable model which does not change over time. |
getName() |
Returns the name of this parameter. |
getTypes() |
Return the types of this parameter. |
saveState() |
Serializes the state of the parameter to JSON. |
setName(name) |
Sets the name of this parameter to the given name. |
setProcedureModel(model) |
Sets the procedure model this parameter is associated with. |
setTypes(types) |
Sets the types of this parameter to the given type. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `Procedures.IParameterModel` interface defines a data model for procedure parameters in Blockly."],["It includes methods to manage a parameter's ID, name, and types, as well as its association with a procedure model."],["`IParameterModel` provides functionality to save and load the parameter's state using JSON serialization."],["Developers can use this interface to interact with and manipulate procedure parameter data within Blockly applications."]]],["The `Procedures.IParameterModel` interface defines a data model for a procedure parameter. Key actions include retrieving parameter information via `getId()`, `getName()`, and `getTypes()`, which return the unique ID, name, and types of the parameter, respectively. `saveState()` serializes the parameter's state to JSON. Modification actions include `setName()`, `setProcedureModel()`, and `setTypes()`, which allow updating the parameter's name, its associated procedure model, and its type.\n"]]