public static interface TreeWidget.Nodes
Object[] root = {
"root", "leaf 0", // { 0 }
"leaf 1", // { 1 }
new Object[] {
"branch 2", "leaf 2-0", // { 2, 0 }
"leaf 2-1" }, // { 2, 1 }
new Object[] {
"branch 3", new Object[] {
"branch 3-0", "leaf 3-0-0" }, // { 3, 0, 0 }
"leaf 3-1" }, // { 3, 1 }
"leaf 4" }; // { 4 }
Assume the node value of leaf node '2-1' is '48', 'getIndices(48)'
returns an array '{ 2, 1 }'. 'getValue( { 2, 1 } )' returns '48'.| Modifier and Type | Method and Description |
|---|---|
int[] |
getIndices(int n)
Returns an array of indices which specifies a node whose value is
n. |
Object[] |
getRoot()
Returns tree strucutre.
|
int |
getValue(int[] indices)
Returns a value of a node which is specified by an array of indices.
|
Object[] getRoot()
int[] getIndices(int n)
n.n - a node valueint getValue(int[] indices)
indices - an array of indices.Copyright © 2014. All Rights Reserved.