public final class POS
extends java.lang.Object
implements java.io.Serializable
POS has a human-readable
label that can be used to print it, and a key by which it can be looked up.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
_cachedToString |
private Resolvable |
_key |
private Resolvable |
_label |
static POS |
ADJECTIVE |
static POS |
ADVERB |
private static java.util.List |
ALL_POS |
static POS |
NOUN |
(package private) static long |
serialVersionUID |
static POS |
VERB |
| Modifier | Constructor and Description |
|---|---|
private |
POS(java.lang.String label,
java.lang.String key) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
An instance of POS is equal to another iff they're underlying keys are
equal.
|
static java.util.List |
getAllPOS() |
java.lang.String |
getKey()
Gets the key for this POS.
|
java.lang.String |
getLabel()
Return a label intended for textual presentation.
|
static POS |
getPOSForKey(java.lang.String key)
Return the
POS whose key matches key,
or null if the key does not match any POS. |
static POS |
getPOSForLabel(java.lang.String label)
Return the
POS whose key matches label,
or null if the label does not match any POS. |
int |
hashCode()
Returns the underlying pos key's hashcode.
|
java.lang.String |
toString() |
static final long serialVersionUID
public static final POS NOUN
public static final POS VERB
public static final POS ADJECTIVE
public static final POS ADVERB
private static final java.util.List ALL_POS
private Resolvable _label
private Resolvable _key
private transient java.lang.String _cachedToString
public static java.util.List getAllPOS()
public static POS getPOSForLabel(java.lang.String label)
POS whose key matches label,
or null if the label does not match any POS.public static POS getPOSForKey(java.lang.String key)
POS whose key matches key,
or null if the key does not match any POS.public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the comparison objectpublic java.lang.String getLabel()
public java.lang.String getKey()