public class SynsetID extends Object implements ISynsetID
ISynsetID interface| Modifier and Type | Field and Description |
|---|---|
static String |
synsetIDPrefix
String prefix for the
toString() method. |
| Constructor and Description |
|---|
SynsetID(int offset,
POS pos)
Constructs a new synset id with the specified offset and part of speech.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
public static final String synsetIDPrefix
toString() method.public SynsetID(int offset,
POS pos)
offset - the offsetpos - the part of speech; may not be nullNullPointerException - if the specified part of speech is nullIllegalArgumentException - if the specified offset is not a legal offsetpublic int getOffset()
ISynsetIDpublic POS getPOS()
IHasPOSnull.public 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 whitespaceNullPointerException - if the specified string is nullIllegalArgumentException - if the specified string is not a properly formatted synset idCopyright © 2018. All rights reserved.