net.sf.extjwnl.data.list
Class PointerTargetNode

java.lang.Object
  extended by net.sf.extjwnl.data.list.PointerTargetNode
All Implemented Interfaces:
Cloneable, Node, DeepCloneable
Direct Known Subclasses:
PointerTargetTreeNode

public class PointerTargetNode
extends Object
implements Node

A node in a PointerTargetNodeList.

Author:
John Didion , Aliaksandr Autayeu

Constructor Summary
PointerTargetNode(PointerTarget target)
           
PointerTargetNode(PointerTarget target, PointerType type)
           
 
Method Summary
 PointerTargetNode clone()
          Create a shallow clone of the object.
 PointerTargetNode deepClone()
          Create a deep clone of the object.
 boolean equals(Object object)
          Two PointerTargetNodes are equal if they have the same type and PointerTarget
 PointerTarget getPointerTarget()
           
 Synset getSynset()
          If the target is a synset, return it, otherwise it's a word so return the word's parent synset.
 PointerType getType()
           
 Word getWord()
          If the target is a word, return it, otherwise return null.
 int hashCode()
           
 boolean isLexical()
          Returns true if the target is a Word, else false.
 void setType(PointerType type)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PointerTargetNode

public PointerTargetNode(PointerTarget target)

PointerTargetNode

public PointerTargetNode(PointerTarget target,
                         PointerType type)
Method Detail

setType

public void setType(PointerType type)

getType

public PointerType getType()

getPointerTarget

public PointerTarget getPointerTarget()

isLexical

public boolean isLexical()
Returns true if the target is a Word, else false.

Returns:
true if the target is a Word, else false

getSynset

public Synset getSynset()
If the target is a synset, return it, otherwise it's a word so return the word's parent synset.

Returns:
If the target is a synset, return it, otherwise it's a word so return the word's parent synset

getWord

public Word getWord()
If the target is a word, return it, otherwise return null.

Returns:
if the target is a word, return it, otherwise return null

equals

public boolean equals(Object object)
Two PointerTargetNodes are equal if they have the same type and PointerTarget

Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public PointerTargetNode clone()
                        throws CloneNotSupportedException
Description copied from interface: DeepCloneable
Create a shallow clone of the object.

Specified by:
clone in interface DeepCloneable
Overrides:
clone in class Object
Throws:
CloneNotSupportedException - CloneNotSupportedException

deepClone

public PointerTargetNode deepClone()
                            throws UnsupportedOperationException
Description copied from interface: DeepCloneable
Create a deep clone of the object.

Specified by:
deepClone in interface DeepCloneable
Returns:
a deep clone of the object
Throws:
UnsupportedOperationException


Copyright © 2011. All Rights Reserved.