Class PointerTargetNode

  • All Implemented Interfaces:
    java.lang.Cloneable, Node, DeepCloneable
    Direct Known Subclasses:
    PointerTargetTreeNode

    public class PointerTargetNode
    extends java.lang.Object
    implements Node
    A node in a PointerTargetNodeList.
    • Field Detail

      • _type

        private PointerType _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

        private transient java.lang.String _cachedToString
    • Method Detail

      • isLexical

        public boolean isLexical()
        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.
      • getWord

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

        public boolean equals​(java.lang.Object object)
        Two PointerTargetNodes are equal if they have the same type and PointerTarget
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • clone

        public java.lang.Object clone()
        Description copied from interface: DeepCloneable
        Create a shallow clone of the object
        Specified by:
        clone in interface DeepCloneable
        Overrides:
        clone in class java.lang.Object
      • deepClone

        public java.lang.Object deepClone()
                                   throws java.lang.UnsupportedOperationException
        Description copied from interface: DeepCloneable
        Create a deep clone of the object
        Specified by:
        deepClone in interface DeepCloneable
        Throws:
        java.lang.UnsupportedOperationException