public class PointerTargetTreeNode extends PointerTargetNode
PointerTargetTreeNodeList
. Each node can have a childTreeList, which is a list of nodes that
are children of this node, and a pointerTreeList, which is a tree of pointers related to this node's
target. Basically, this allows for a single tree supporting multiple relationships. For example, you
may have a ancestry tree, and each node, besides having links to its children, has links to the
synonyms of its target.Constructor and Description |
---|
PointerTargetTreeNode(PointerTarget target) |
PointerTargetTreeNode(PointerTarget target,
PointerTargetTreeNodeList childTreeList,
PointerTargetTreeNodeList pointerTreeList,
PointerType type) |
PointerTargetTreeNode(PointerTarget target,
PointerTargetTreeNodeList childTreeList,
PointerTargetTreeNodeList pointerTreeList,
PointerType type,
PointerTargetTreeNode parent) |
PointerTargetTreeNode(PointerTarget target,
PointerTargetTreeNodeList childTreeList,
PointerType type) |
PointerTargetTreeNode(PointerTarget target,
PointerTargetTreeNodeList childTreeList,
PointerType type,
PointerTargetTreeNode parent) |
PointerTargetTreeNode(PointerTarget target,
PointerType type) |
PointerTargetTreeNode(PointerTarget target,
PointerType type,
PointerTargetTreeNode parent) |
Modifier and Type | Method and Description |
---|---|
PointerTargetTreeNode |
clone()
Create a shallow clone of the object.
|
PointerTargetTreeNode |
deepClone()
Create a deep clone of the object.
|
boolean |
equals(java.lang.Object obj)
Two PointerTargetNodes are equal if they have the same type and PointerTarget
|
PointerTargetTreeNodeList |
getChildTreeList() |
PointerTargetTreeNode |
getParent() |
PointerTargetTreeNodeList |
getPointerTreeList() |
boolean |
hasChildTreeList() |
boolean |
hasParent() |
boolean |
hasPointerTreeList() |
boolean |
hasValidChildTreeList()
Returns whether a childTreeList is not null and not empty.
|
boolean |
hasValidPointerTreeList()
Returns whether pointerTreeList is not null and not empty.
|
void |
setChildTreeList(PointerTargetTreeNodeList list) |
void |
setParent(PointerTargetTreeNode parent) |
void |
setPointerTreeList(PointerTargetTreeNodeList list) |
java.util.List<PointerTargetNodeList> |
toList(PointerTargetNodeList list)
Convert this node into a list of PointerTargetNodeLists's, each representing a unique branch through the tree
|
java.lang.String |
toString() |
getPointerTarget, getSynset, getType, getWord, hashCode, isLexical, setType
public PointerTargetTreeNode(PointerTarget target, PointerTargetTreeNodeList childTreeList, PointerTargetTreeNodeList pointerTreeList, PointerType type, PointerTargetTreeNode parent)
public PointerTargetTreeNode(PointerTarget target)
public PointerTargetTreeNode(PointerTarget target, PointerType type)
public PointerTargetTreeNode(PointerTarget target, PointerTargetTreeNodeList childTreeList, PointerType type)
public PointerTargetTreeNode(PointerTarget target, PointerType type, PointerTargetTreeNode parent)
public PointerTargetTreeNode(PointerTarget target, PointerTargetTreeNodeList childTreeList, PointerType type, PointerTargetTreeNode parent)
public PointerTargetTreeNode(PointerTarget target, PointerTargetTreeNodeList childTreeList, PointerTargetTreeNodeList pointerTreeList, PointerType type)
public boolean equals(java.lang.Object obj)
PointerTargetNode
equals
in class PointerTargetNode
public java.lang.String toString()
toString
in class PointerTargetNode
public void setChildTreeList(PointerTargetTreeNodeList list)
public void setPointerTreeList(PointerTargetTreeNodeList list)
public void setParent(PointerTargetTreeNode parent)
public PointerTargetTreeNode getParent()
public PointerTargetTreeNodeList getChildTreeList()
public PointerTargetTreeNodeList getPointerTreeList()
public boolean hasChildTreeList()
public boolean hasValidChildTreeList()
public boolean hasPointerTreeList()
public boolean hasValidPointerTreeList()
public boolean hasParent()
public java.util.List<PointerTargetNodeList> toList(PointerTargetNodeList list)
list
- listpublic PointerTargetTreeNode clone() throws java.lang.CloneNotSupportedException
DeepCloneable
clone
in interface DeepCloneable
clone
in class PointerTargetNode
java.lang.CloneNotSupportedException
- CloneNotSupportedExceptionpublic PointerTargetTreeNode deepClone() throws java.lang.UnsupportedOperationException
DeepCloneable
deepClone
in interface DeepCloneable
deepClone
in class PointerTargetNode
java.lang.UnsupportedOperationException