|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javatest.TRT_TreeNode
public class TRT_TreeNode
This is the implementation of a tree node structure for TestResultTable. Only the interface implementation is meant to be exposed. Assumptions are made that this is the only node class (implementation of TreeNode) used in the tree.
Nested Class Summary | |
---|---|
static class |
TRT_TreeNode.Fault
|
Field Summary | |
---|---|
protected static int |
debug
|
Method Summary | |
---|---|
void |
addObserver(TestResultTable.TreeNodeObserver obs)
Add an observer to watch this node for changes. |
java.lang.Object |
getChild(int index)
Get the child at the specified location. |
int |
getChildCount()
Find out how many children this node contains. |
int[] |
getChildStatus()
Get the statistics for the state of tests under this node. |
TestResultTable |
getEnclosingTable()
Find out what TestResultTable this node is part of. |
int |
getEstimatedSize()
Get the estimated number of tests below this node. |
int |
getIndex(java.lang.Object target)
Search for a specific item in this node. |
java.lang.String |
getName()
The name of this node, not including all the ancestors names. |
TestResultTable.TreeNode |
getParent()
Get the parent of this node. |
int |
getSize()
Find out how many tests are in this node and below. |
TestResult[] |
getTestResults()
Get any immediate children of this node which are test result objects. |
TestResultTable.TreeNode[] |
getTreeNodes()
Get only the children of this node which are branches. |
boolean |
isLeaf(int index)
Is the given element of this node a leaf. |
boolean |
isRoot()
Is this the root of a tree. |
boolean |
isUpToDate()
Has the finder been used to scan this node from secondary storage?. |
TestResult |
matchTest(java.lang.String url)
Finds a TestResult in this node with the given name. |
boolean |
refreshIfNeeded()
Refresh this entire node if necessary. |
void |
removeObserver(TestResultTable.TreeNodeObserver obs)
Remove an observer that was previously added. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static int debug
Method Detail |
---|
public void addObserver(TestResultTable.TreeNodeObserver obs)
addObserver
in interface TestResultTable.TreeNode
obs
- The observer to attach to this node. Should never be
null.public void removeObserver(TestResultTable.TreeNodeObserver obs)
removeObserver
in interface TestResultTable.TreeNode
obs
- The observer to remove. No effect if it was never
attached.public int getSize()
getSize
in interface TestResultTable.TreeNode
public int getEstimatedSize()
public TestResultTable.TreeNode getParent()
TestResultTable.TreeNode
getParent
in interface TestResultTable.TreeNode
public boolean isRoot()
TestResultTable.TreeNode
isRoot
in interface TestResultTable.TreeNode
public TestResultTable getEnclosingTable()
TestResultTable.TreeNode
getEnclosingTable
in interface TestResultTable.TreeNode
public boolean isUpToDate()
TestResultTable.TreeNode
isUpToDate
in interface TestResultTable.TreeNode
public int getChildCount()
getChildCount
in interface TestResultTable.TreeNode
public java.lang.Object getChild(int index)
TestResultTable.TreeNode
getChild
in interface TestResultTable.TreeNode
index
- The location to retrieve.
public TestResult[] getTestResults()
TestResultTable.TreeNode
getTestResults
in interface TestResultTable.TreeNode
public TestResultTable.TreeNode[] getTreeNodes()
getTreeNodes
in interface TestResultTable.TreeNode
public java.lang.String getName()
TestResultTable.TreeNode
getName
in interface TestResultTable.TreeNode
TestResultTable.getRootRelativePath(com.sun.javatest.TestResultTable.TreeNode)
public boolean isLeaf(int index)
TestResultTable.TreeNode
isLeaf
in interface TestResultTable.TreeNode
index
- The element index of this node. An out of range index
will return false.
public int[] getChildStatus()
TestResultTable.TreeNode
getChildStatus
in interface TestResultTable.TreeNode
public int getIndex(java.lang.Object target)
TestResultTable.TreeNode
getIndex
in interface TestResultTable.TreeNode
target
- The target object should either be of type TreeNode or TestResult
public TestResult matchTest(java.lang.String url)
TestResultTable.TreeNode
matchTest
in interface TestResultTable.TreeNode
url
- The full name of the test to find.
TestDescription.getRootRelativeURL()
public boolean refreshIfNeeded()
TestResultTable.refreshIfNeeded(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |