Class Exc

  • All Implemented Interfaces:
    java.io.Serializable, DictionaryElement

    public final class Exc
    extends java.lang.Object
    implements DictionaryElement
    Represents an entry in an exception file. Contains all of the exceptions for the given lemma. Exception lists are alphabetized lists of inflected forms of words and their base forms. The first field of each line is an inflected form, followed by a space separated list of one or more base forms of the word. There is one exception list file for each syntactic category. From wndb.5WN in WordNet base documentation.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String _cachedToString
      The cached to string value.
      private java.util.List _exceptions
      All the exceptions for lemma.
      private java.lang.String _exceptionString
      The exception string.
      private java.lang.String _lemma
      The excepted word
      private POS _pos
      The part of speech.
      (package private) static long serialVersionUID
      Unique identifier.
    • Constructor Summary

      Constructors 
      Constructor Description
      Exc​(POS pos, java.lang.String lemma, java.util.List exceptions)
      Creates a new exception entry.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Returns true if lemma and exceptions are equal.
      java.lang.String getException​(int index)
      Get the exception at index index.
      java.lang.String[] getExceptionArray()
      Get the collection of Exc objects in array form.
      java.util.List getExceptions()
      Get the List of exceptions.
      private java.lang.String getExceptionsAsString()
      Gets the exceptions as a string bundle.
      int getExceptionsSize()
      Gets the number of exceptions.
      java.lang.Object getKey()
      Gets the lemma.
      java.lang.String getLemma()
      Gets the lemma of the exception word.
      POS getPOS()
      Gets the part of speech.
      DictionaryElementType getType()
      Gets the type of this exception entry.
      int hashCode()
      private void readObject​(java.io.ObjectInputStream in)  
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        static final long serialVersionUID
        Unique identifier.
        See Also:
        Constant Field Values
      • _pos

        private POS _pos
        The part of speech.
      • _lemma

        private java.lang.String _lemma
        The excepted word
      • _exceptions

        private java.util.List _exceptions
        All the exceptions for lemma.
      • _exceptionString

        private java.lang.String _exceptionString
        The exception string.
      • _cachedToString

        private transient java.lang.String _cachedToString
        The cached to string value.
    • Constructor Detail

      • Exc

        public Exc​(POS pos,
                   java.lang.String lemma,
                   java.util.List exceptions)
        Creates a new exception entry.
        Parameters:
        pos - - the part of speech
        lemma - - the word's lemma form
        exceptions - - the given exceptions
    • Method Detail

      • getPOS

        public POS getPOS()
        Gets the part of speech.
        Returns:
      • getLemma

        public java.lang.String getLemma()
        Gets the lemma of the exception word.
        Returns:
        lemma
      • getException

        public java.lang.String getException​(int index)
        Get the exception at index index.
      • getExceptionsSize

        public int getExceptionsSize()
        Gets the number of exceptions.
        Returns:
        int
      • getExceptionArray

        public java.lang.String[] getExceptionArray()
        Get the collection of Exc objects in array form.
      • getExceptions

        public java.util.List getExceptions()
        Get the List of exceptions.
      • equals

        public boolean equals​(java.lang.Object obj)
        Returns true if lemma and exceptions are equal.
        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
      • getExceptionsAsString

        private java.lang.String getExceptionsAsString()
        Gets the exceptions as a string bundle.
        Returns:
      • readObject

        private void readObject​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException