|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.viewers.TreeNode
A simple data structure that is useful for implemented tree models. This can
* be returned by
* IStructuredContentProvider.getElements(Object)
.
* It allows simple delegation of methods from
* ITreeContentProvider
such as
* ITreeContentProvider.getChildren(Object)
,
* ITreeContentProvider.getParent(Object)
and
* ITreeContentProvider.hasChildren(Object)
*
* @since 3.2
Field Summary | |
---|---|
protected Object |
value
The value contained in this node. |
Constructor Summary | |
---|---|
TreeNode(Object value)
Constructs a new instance of TreeNode |
Method Summary | |
---|---|
boolean |
equals(Object object)
|
TreeNode[] |
getChildren()
Returns the child nodes. |
TreeNode |
getParent()
Returns the parent node |
Object |
getValue()
Returns the value held by this node |
boolean |
hasChildren()
Returns whether the tree has any children |
int |
hashCode()
|
void |
setChildren(TreeNode[] children)
Sets the children for this node |
void |
setParent(TreeNode parent)
Sets the parent for this node |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Object value
Constructor Detail |
public TreeNode(Object value)
TreeNode
.
*
* @param value
* The value held by this node; may be anything.
Method Detail |
public boolean equals(Object object)
public TreeNode[] getChildren()
null
* before being returned.
*
* @return The child nodes; may be null
, but never empty.
* There should be no null
children in the array.
public TreeNode getParent()
null
if there are no
* parent nodes.
public Object getValue()
public boolean hasChildren()
true
if its array of children is not
* null
and is non-empty; false
* otherwise.
public int hashCode()
public void setChildren(TreeNode[] children)
null
or empty. There
* should be no null
children in the array.
public void setParent(TreeNode parent)
null
.
|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.