public interface TreeNode
equalsをオーバーライドするTreeNodeの実装であり、通常、hashCodeもオーバーライドする必要があります。 詳細は、TreeModelを参照してください。 ツリー・ノードの詳細および使用例は、「The Java Tutorial」の「How to Use Tree Nodes」を参照してください。
| 修飾子と型 | メソッド | 説明 |
|---|---|---|
Enumeration |
children() |
レシーバの子を
Enumerationとして返します。 |
boolean |
getAllowsChildren() |
レシーバが子を許可する場合はtrueを返します。
|
TreeNode |
getChildAt(int childIndex) |
インデックス
childIndexにある子TreeNodeを返します。 |
int |
getChildCount() |
TreeNodeのレシーバが格納する子の数を返します。 |
int |
getIndex(TreeNode node) |
レシーバの子の中で
nodeのインデックスを返します。 |
TreeNode |
getParent() |
レシーバの親
TreeNodeを返します。 |
boolean |
isLeaf() |
レシーバが葉である場合はtrueを返します。
|
TreeNode getChildAt(int childIndex)
childIndexにある子TreeNodeを返します。int getChildCount()
TreeNodeのレシーバが格納する子の数を返します。TreeNode getParent()
TreeNodeを返します。int getIndex(TreeNode node)
nodeのインデックスを返します。 レシーバがnodeを格納しない場合は、-1が返されます。 boolean getAllowsChildren()
boolean isLeaf()
Enumeration children()
Enumerationとして返します。 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。