コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ブロックする >[ブロック] >getParent
Block.getParent() メソッド
親ブロックを返します。最上位ブロックの場合は null を返します。親ブロックは、前の接続に接続されたブロック(statement ブロックの場合)、または出力接続に接続されているブロック(value ブロックの場合)です。
署名:
getParent(): this | null;
戻り値:
この |null
現在のブロックを保持するブロック(存在する場合)。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-25 UTC。"],[],["The `Block.getParent()` method retrieves the parent block of a given block. It returns either the parent block instance or `null` if the block is at the top level. The parent is determined by the block's connection: the previous connection for statement blocks or the output connection for value blocks. The method's signature indicates it returns either `this` (the parent block) or `null`.\n"]]