|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
public interface SimpleNodeInterface
SimpleNodeInterface is an interface which defines methods to navigate down a hierarchy. The node retrieval methods use 0-based indexing for node indexes.
| Method Summary | |
|---|---|
abstract int |
countNodeChildren(int maximumChildCount)
Counts the children of the current node. |
abstract SimpleNodeInterface |
getNodeChild(int index)
Returns the child node at the specified index. |
abstract int |
getNodeChildCount()
Returns the number of children. |
abstract SimpleNodeInterface[] |
getNodeChildren(int startIndex,
int count)
Returns the specified range of children for the current node. |
abstract boolean |
isLeafNode()
Indicates whether the current node is a leaf. |
| Method Detail |
|---|
int countNodeChildren(int maximumChildCount)
countNodeChildren is an instruction to determine the number of children even though that number is not readily known. To limit the potential overhead of this determination, the maximum number of children to read may be specified.
maxCount - Maximum number of children to read, or 0 to read indefinitely.
Implementations where the number of children is always known should
ignore this parameter. In cases where the total number of children
is unknown, but the number known so far is greater than maxCount
should return the larger known number. Thus maxCount is only used as
a limiting factor when the implementation has to actually do
computation (e.g. fetch observations).
int getNodeChildCount()
boolean isLeafNode()
true
indicates that the current node is a leaf and hence will not have any children.
true if the current node is a leaf, otherwise falseSimpleNodeInterface getNodeChild(int index)
true then this method should return null.
index - the 0-based index of the child node to retrieve
true.
SimpleNodeInterface[] getNodeChildren(int startIndex,
int count)
true then this method should return null.
startIndex - 0-based index which identifies the start of the rangecount - the amount of children to get
true.
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||