Package org.docx4j.model.styles
Class Node<T>
java.lang.Object
org.docx4j.model.styles.Node<T>
public class Node<T>
extends java.lang.Object
Represents a node of the Tree class. The Node is also a container, and
can be thought of as instrumentation to determine the location of the type T
in the Tree.
-
Field Details
-
Constructor Details
-
Node
Convenience ctor to create a Nodewith an instance of T. - Parameters:
data- an instance of T.
-
-
Method Details
-
getParent
-
setParent
-
getChildren
Return the children of Node. The Tree is represented by a single root Node whose children are represented by a List >. Each of these Node elements in the List can have children. The getChildren() method will return the children of a Node . - Returns:
- the children of Node
-
addChild
Adds a child to the list of children for this Node. The addition of the first child will create a new List >. - Parameters:
child- a Nodeobject to set.
-
getData
-
setData
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-