|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mit.jwi.item.SynsetID
public class SynsetID
Default implementation of the ISynsetID interface
| Field Summary | |
|---|---|
static String |
synsetIDPrefix
String prefix for the toString() method. |
| Constructor Summary | |
|---|---|
SynsetID(int offset,
POS pos)
Constructs a new synset id with the specified offset and part of speech. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
int |
getOffset()
Returns the offset for the specified synset. |
POS |
getPOS()
Returns the associated part of speech for this object. |
int |
hashCode()
|
static SynsetID |
parseSynsetID(String value)
Convenience method for transforming the result of the toString()
method back into an ISynsetID. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String synsetIDPrefix
toString() method.
| Constructor Detail |
|---|
public SynsetID(int offset,
POS pos)
offset - the offsetpos - the part of speech; may not be null
NullPointerException - if the specified part of speech is null
IllegalArgumentException - if the specified offset is not a legal offset| Method Detail |
|---|
public int getOffset()
ISynsetID
getOffset in interface ISynsetIDpublic POS getPOS()
IHasPOSnull.
getPOS in interface IHasPOSnull if none.public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic static SynsetID parseSynsetID(String value)
toString()
method back into an ISynsetID. Synset IDs are always 14
characters long and have the following format: SID-########-C, where
######## is the zero-filled eight decimal digit offset of the synset, and
C is the upper-case character code indicating the part of speech.
value - the string representation of the id; may include leading or
trailing whitespace
NullPointerException - if the specified string is null
IllegalArgumentException - if the specified string is not a properly formatted synset id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||