|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.mit.jwi.item.SynsetID
public class SynsetID
Default implementation of the ISynsetID
interface
Field Summary | |
---|---|
static java.lang.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(java.lang.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(java.lang.String value)
Convenience method for transforming the result of the toString()
method back into an ISynsetID . |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String synsetIDPrefix
toString()
method.
Constructor Detail |
---|
public SynsetID(int offset, POS pos)
offset
- the offsetpos
- the part of speech; may not be null
java.lang.NullPointerException
- if the specified part of speech is null
java.lang.IllegalArgumentException
- if the specified offset is not a legal offsetMethod Detail |
---|
public int getOffset()
ISynsetID
getOffset
in interface ISynsetID
public POS getPOS()
IHasPOS
null
.
getPOS
in interface IHasPOS
null
if none.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static SynsetID parseSynsetID(java.lang.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
java.lang.NullPointerException
- if the specified string is null
java.lang.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 |