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も参照してください。