Class PointerTargetNode
java.lang.Object
net.didion.jwnl.data.list.PointerTargetNode
- All Implemented Interfaces:
Cloneable, Node, DeepCloneable
- Direct Known Subclasses:
PointerTargetTreeNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate PointerTargetThe PointerTargetprivate PointerTypeThe relation type that produced this node. -
Constructor Summary
ConstructorsConstructorDescriptionPointerTargetNode(PointerTarget target) PointerTargetNode(PointerTarget target, PointerType type) -
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 PointerTargetIf the target is a synset, return it, otherwise it's a word so return the word's parent synset.getType()getWord()If the target is a word, return it, otherwise return null.inthashCode()booleanReturns true if the target is a Word, else false.voidsetType(PointerType type) toString()
-
Field Details
-
_target
The PointerTarget -
_type
The relation type that produced this node. e.g. if you make a call to getDirectHypernyms(), each node in the resultant list will have a type of PointerType.HYPERNYM. -
_cachedToString
-
-
Constructor Details
-
PointerTargetNode
-
PointerTargetNode
-
-
Method Details
-
setType
-
getType
-
getPointerTarget
-
isLexical
public boolean isLexical()Returns true if the target is a Word, else false. -
getSynset
If the target is a synset, return it, otherwise it's a word so return the word's parent synset. -
getWord
If the target is a word, return it, otherwise return null. -
equals
-
toString
-
hashCode
-
clone
Description copied from interface:DeepCloneableCreate a shallow clone of the object- Specified by:
clonein interfaceDeepCloneable- Overrides:
clonein classObject
-
deepClone
Description copied from interface:DeepCloneableCreate a deep clone of the object- Specified by:
deepClonein interfaceDeepCloneable- Throws:
UnsupportedOperationException
-