封鎖 >封鎖 >hasIcon
Block.hasIcon() 方法
Signature:
hasIcon(type: IconType<IIcon>): boolean;
參數
傳回:
布林值
如果區塊中有指定類型的圖示,則為「true」,否則傳回「false」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-21 (世界標準時間)。
[null,null,["上次更新時間:2024-08-21 (世界標準時間)。"],[[["The `Block.hasIcon()` method checks for the presence of a specific icon type on a block."],["It accepts an `IconType` as input and returns `true` if the icon is found, otherwise `false`."]]],["The `Block.hasIcon()` method checks for the existence of a specific icon type on a block. It takes one parameter, `type`, of `IconType\u003cIIcon\u003e`. The method returns a boolean value: `true` if an icon of the specified type is present on the block, and `false` if it is not. It determines whether the block contains an icon with the given icon `type`.\n"]]