Package net.didion.jwnl.data.list
Class PointerTargetNode
java.lang.Object
net.didion.jwnl.data.list.PointerTargetNode
- All Implemented Interfaces:
Cloneable
,Node
,DeepCloneable
- Direct Known Subclasses:
PointerTargetTreeNode
A node in a
PointerTargetNodeList
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private PointerTarget
The PointerTargetprivate PointerType
The 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 objectboolean
Two 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.int
hashCode()
boolean
Returns true if the target is a Word, else false.void
setType
(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
Two PointerTargetNodes are equal if they have the same type and PointerTarget -
toString
-
hashCode
public int hashCode() -
clone
Description copied from interface:DeepCloneable
Create a shallow clone of the object- Specified by:
clone
in interfaceDeepCloneable
- Overrides:
clone
in classObject
-
deepClone
Description copied from interface:DeepCloneable
Create a deep clone of the object- Specified by:
deepClone
in interfaceDeepCloneable
- Throws:
UnsupportedOperationException
-