public static interface TreeQuestion.Model
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getChild(java.lang.Object node,
int index)
Get a child of a specified node, or null if no such child exists.
|
int |
getChildCount(java.lang.Object node)
Get the number of children of a specified node.
|
java.lang.String |
getName(java.lang.Object node)
Get the name of a specified node.
|
java.lang.String |
getPath(java.lang.Object node)
Get the full path from the root node of a specified node.
|
java.lang.Object |
getRoot()
Get the root node of the tree.
|
boolean |
isLeaf(java.lang.Object node)
Determine if this a node is a leaf node.
|
java.lang.Object getRoot()
int getChildCount(java.lang.Object node)
node
- the node for which to get the number of childrenjava.lang.Object getChild(java.lang.Object node, int index)
node
- the node for which to get the childindex
- the index of the child; this should be a
number greater than or equal to zero and less than the number
of children of the node.getChildCount(java.lang.Object)
java.lang.String getName(java.lang.Object node)
node
- the node whose name is requiredjava.lang.String getPath(java.lang.Object node)
node
- the node whose path is requiredboolean isLeaf(java.lang.Object node)
node
- the node to check for being a leafCopyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.