با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
blockly > IVariableMap
رابط IVariableMap
نقشه های متغیر، اشیاء کانتینری هستند که مسئول ذخیره و مدیریت مجموعه ای از متغیرهای ارجاع شده در یک فضای کاری هستند.
هر یک از این روشها ممکن است متغیرهایی را تعریف کند که نامها و انواع آنها قانونی هستند و در صورت عدم رعایت آنها، آنها را پرتاب میکند.
امضا:
export interface IVariableMap<T extends IVariableModel<IVariableState>>
روش ها
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],null,["[blockly](./blockly.md) \\\u003e [IVariableMap](./blockly.ivariablemap_interface.md)\n\nIVariableMap interface\n----------------------\n\nVariable maps are container objects responsible for storing and managing the set of variables referenced on a workspace.\n\nAny of these methods may define invariants about which names and types are legal, and throw if they are not met.\n\n**Signature:** \n\n export interface IVariableMap\u003cT extends IVariableModel\u003cIVariableState\u003e\u003e \n\nMethods\n-------\n\n| Method | Description |\n|-------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [addVariable(variable)](./blockly.ivariablemap_interface.addvariable_1_methodsignature.md) | |\n| [changeVariableType(variable, newType)](./blockly.ivariablemap_interface.changevariabletype_1_methodsignature.md) | |\n| [clear()](./blockly.ivariablemap_interface.clear_1_methodsignature.md) | |\n| [createVariable(name, id, type)](./blockly.ivariablemap_interface.createvariable_1_methodsignature.md) | Creates a new variable with the given name. If ID is not specified, the variable map should create one. Returns the new variable. |\n| [deleteVariable(variable)](./blockly.ivariablemap_interface.deletevariable_1_methodsignature.md) | |\n| [getAllVariables()](./blockly.ivariablemap_interface.getallvariables_1_methodsignature.md) | |\n| [getTypes()](./blockly.ivariablemap_interface.gettypes_1_methodsignature.md) | Returns a list of the set of types of the variables managed by this variable map. |\n| [getVariable(name, type)](./blockly.ivariablemap_interface.getvariable_1_methodsignature.md) | Returns the variable with the given name, or null if not found. If `type` is provided, the variable's type must also match, or null should be returned. |\n| [getVariableById(id)](./blockly.ivariablemap_interface.getvariablebyid_1_methodsignature.md) | |\n| [getVariablesOfType(type)](./blockly.ivariablemap_interface.getvariablesoftype_1_methodsignature.md) | Returns a list of all of the variables of the given type managed by this variable map. |\n| [renameVariable(variable, newName)](./blockly.ivariablemap_interface.renamevariable_1_methodsignature.md) | Changes the name of the given variable to the name provided and returns the renamed variable. |"]]