Package net.didion.jwnl.data
Class POS
- java.lang.Object
-
- net.didion.jwnl.data.POS
-
- All Implemented Interfaces:
Serializable
public final class POS extends Object implements Serializable
Instances of this class enumerate the possible major syntactic categories, or Part's Of Speech. EachPOShas a human-readable label that can be used to print it, and a key by which it can be looked up.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)An instance of POS is equal to another iff they're underlying keys are equal.static ListgetAllPOS()StringgetKey()Gets the key for this POS.StringgetLabel()Return a label intended for textual presentation.static POSgetPOSForKey(String key)Return thePOSwhose key matches key, or null if the key does not match any POS.static POSgetPOSForLabel(String label)Return thePOSwhose key matches label, or null if the label does not match any POS.inthashCode()Returns the underlying pos key's hashcode.StringtoString()
-
-
-
Method Detail
-
getAllPOS
public static List getAllPOS()
-
getPOSForLabel
public static POS getPOSForLabel(String label)
Return thePOSwhose key matches label, or null if the label does not match any POS.
-
getPOSForKey
public static POS getPOSForKey(String key)
Return thePOSwhose key matches key, or null if the key does not match any POS.
-
hashCode
public int hashCode()
Returns the underlying pos key's hashcode.
-
equals
public boolean equals(Object obj)
An instance of POS is equal to another iff they're underlying keys are equal.
-
getLabel
public String getLabel()
Return a label intended for textual presentation.
-
getKey
public String getKey()
Gets the key for this POS.- Returns:
- key
-
-