Package net.didion.jwnl.data
Class Exc
- java.lang.Object
-
- net.didion.jwnl.data.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_cachedToStringThe cached to string value.private java.util.List_exceptionsAll the exceptions forlemma.private java.lang.String_exceptionStringThe exception string.private java.lang.String_lemmaThe excepted wordprivate POS_posThe part of speech.(package private) static longserialVersionUIDUnique identifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Returns true if lemma and exceptions are equal.java.lang.StringgetException(int index)Get the exception at indexindex.java.lang.String[]getExceptionArray()Get the collection of Exc objects in array form.java.util.ListgetExceptions()Get the List of exceptions.private java.lang.StringgetExceptionsAsString()Gets the exceptions as a string bundle.intgetExceptionsSize()Gets the number of exceptions.java.lang.ObjectgetKey()Gets the lemma.java.lang.StringgetLemma()Gets the lemma of the exception word.POSgetPOS()Gets the part of speech.DictionaryElementTypegetType()Gets the type of this exception entry.inthashCode()private voidreadObject(java.io.ObjectInputStream in)java.lang.StringtoString()
-
-
-
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 forlemma.
-
_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 speechlemma- - the word's lemma formexceptions- - the given exceptions
-
-
Method Detail
-
getType
public DictionaryElementType getType()
Gets the type of this exception entry.- Specified by:
getTypein interfaceDictionaryElement
-
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 indexindex.
-
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.
-
getKey
public java.lang.Object getKey()
Gets the lemma.- Specified by:
getKeyin interfaceDictionaryElement
-
equals
public boolean equals(java.lang.Object obj)
Returns true if lemma and exceptions are equal.- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.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.IOExceptionjava.lang.ClassNotFoundException
-
-