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
_cachedToString
The cached to string value.private java.util.List
_exceptions
All the exceptions forlemma
.private java.lang.String
_exceptionString
The exception string.private java.lang.String
_lemma
The excepted wordprivate POS
_pos
The part of speech.(package private) static long
serialVersionUID
Unique identifier.
-
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 indexindex
.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()
-
-
-
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:
getType
in 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:
getKey
in interfaceDictionaryElement
-
equals
public boolean equals(java.lang.Object obj)
Returns true if lemma and exceptions are equal.- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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.IOException
java.lang.ClassNotFoundException
-
-