TreeNode
Contents
[
Hide
]
Inheritance: java.lang.Object
public class TreeNode<T>
A node of a graph
T : a type of Data in the node
Constructors
| Constructor | Description |
|---|---|
| TreeNode() | Initializes a new instance of TreeNode{T} class. |
| TreeNode(T data) | Initializes a new instance of TreeNode{T} class, initializes Data by parameter data |
Methods
| Method | Description |
|---|---|
| add(T value) | Adds a child to the node |
| equals(Object arg0) | |
| getChildren() | Gets children of a node |
| getClass() | |
| getData() | Gets data of a node |
| getParent() | A parent of the node |
| hashCode() | |
| notify() | |
| notifyAll() | |
| setData(T value) | Sets data of a node |
| toString() | Returns a data of node in the string format |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
TreeNode()
public TreeNode()
Initializes a new instance of TreeNode{T} class.
TreeNode(T data)
public TreeNode(T data)
Initializes a new instance of TreeNode{T} class, initializes Data by parameter data
Parameters:
| Parameter | Type | Description |
|---|---|---|
| data | T | iniializes Data |
add(T value)
public TreeNode<T> add(T value)
Adds a child to the node
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | T | Data of a child |
Returns: TreeNode - child node
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getChildren()
public System.Collections.Generic.IGenericList<TreeNode<T>> getChildren()
Gets children of a node
Returns:
com.aspose.ms.System.Collections.Generic.IGenericList<com.aspose.barcode.common.generic.collections.TreeNode
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class>
getData()
public T getData()
Gets data of a node
Returns: T
getParent()
public TreeNode<T> getParent()
A parent of the node
Returns: TreeNode
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setData(T value)
public void setData(T value)
Sets data of a node
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | T |
toString()
public String toString()
Returns a data of node in the string format
Returns: java.lang.String - a data of node in the string format
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |