Class Exc

java.lang.Object
net.didion.jwnl.data.Exc
All Implemented Interfaces:
Serializable, DictionaryElement

public final class Exc extends 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:
  • Field Details

    • serialVersionUID

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

      private POS _pos
      The part of speech.
    • _lemma

      private String _lemma
      The excepted word
    • _exceptions

      private List _exceptions
      All the exceptions for lemma.
    • _exceptionString

      private String _exceptionString
      The exception string.
    • _cachedToString

      private transient String _cachedToString
      The cached to string value.
  • Constructor Details

    • Exc

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

    • getType

      public DictionaryElementType getType()
      Gets the type of this exception entry.
      Specified by:
      getType in interface DictionaryElement
    • getPOS

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

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

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

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

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

      public List getExceptions()
      Get the List of exceptions.
    • getKey

      public Object getKey()
      Gets the lemma.
      Specified by:
      getKey in interface DictionaryElement
    • equals

      public boolean equals(Object obj)
      Returns true if lemma and exceptions are equal.
      Overrides:
      equals in class Object
    • toString

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getExceptionsAsString

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

      private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
      Throws:
      IOException
      ClassNotFoundException