Package net.didion.jwnl.data.list
Class PointerTargetTreeNode
java.lang.Object
net.didion.jwnl.data.list.PointerTargetNode
net.didion.jwnl.data.list.PointerTargetTreeNode
- All Implemented Interfaces:
Cloneable,Node,DeepCloneable
A node in a
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate PointerTargetTreeNodeListThe list of all this node's childrenprivate PointerTargetTreeNodeThis node's parentprivate PointerTargetTreeNodeListThis list of pointers associated with this node -
Constructor Summary
ConstructorsConstructorDescriptionPointerTargetTreeNode(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) -
Method Summary
Modifier and TypeMethodDescriptionclone()Create a shallow clone of the objectCreate a deep clone of the objectbooleanTwo PointerTargetNodes are equal if they have the same type and PointerTargetbooleanbooleanbooleanbooleanA valid childTreeList is one that is not null and not empty.booleanA valid pointerTreeList is one that is not null and not empty.voidvoidsetParent(PointerTargetTreeNode parent) voidtoList(PointerTargetNodeList list) Convert this node into a list of PointerTargetList's, each representing a unique brance through the treetoString()Methods inherited from class net.didion.jwnl.data.list.PointerTargetNode
getPointerTarget, getSynset, getType, getWord, hashCode, isLexical, setType
-
Field Details
-
_childTreeList
The list of all this node's children -
_pointerTreeList
This list of pointers associated with this node -
_parent
This node's parent -
_cachedToString
-
-
Constructor Details
-
PointerTargetTreeNode
public PointerTargetTreeNode(PointerTarget target, PointerTargetTreeNodeList childTreeList, PointerTargetTreeNodeList pointerTreeList, PointerType type, PointerTargetTreeNode parent) -
PointerTargetTreeNode
-
PointerTargetTreeNode
-
PointerTargetTreeNode
public PointerTargetTreeNode(PointerTarget target, PointerTargetTreeNodeList childTreeList, PointerType type) -
PointerTargetTreeNode
-
PointerTargetTreeNode
public PointerTargetTreeNode(PointerTarget target, PointerTargetTreeNodeList childTreeList, PointerType type, PointerTargetTreeNode parent) -
PointerTargetTreeNode
public PointerTargetTreeNode(PointerTarget target, PointerTargetTreeNodeList childTreeList, PointerTargetTreeNodeList pointerTreeList, PointerType type)
-
-
Method Details
-
equals
Description copied from class:PointerTargetNodeTwo PointerTargetNodes are equal if they have the same type and PointerTarget- Overrides:
equalsin classPointerTargetNode
-
toString
- Overrides:
toStringin classPointerTargetNode
-
setChildTreeList
-
setPointerTreeList
-
setParent
-
getParent
-
getChildTreeList
-
getPointerTreeList
-
hasChildTreeList
public boolean hasChildTreeList() -
hasValidChildTreeList
public boolean hasValidChildTreeList()A valid childTreeList is one that is not null and not empty. -
hasPointerTreeList
public boolean hasPointerTreeList() -
hasValidPointerTreeList
public boolean hasValidPointerTreeList()A valid pointerTreeList is one that is not null and not empty. -
hasParent
public boolean hasParent() -
toList
Convert this node into a list of PointerTargetList's, each representing a unique brance through the tree -
clone
Description copied from interface:DeepCloneableCreate a shallow clone of the object- Specified by:
clonein interfaceDeepCloneable- Overrides:
clonein classPointerTargetNode
-
deepClone
Description copied from interface:DeepCloneableCreate a deep clone of the object- Specified by:
deepClonein interfaceDeepCloneable- Overrides:
deepClonein classPointerTargetNode- Throws:
UnsupportedOperationException
-