net.sf.extjwnl.data
Enum POS

java.lang.Object
  extended by java.lang.Enum<POS>
      extended by net.sf.extjwnl.data.POS
All Implemented Interfaces:
Serializable, Comparable<POS>

public enum POS
extends Enum<POS>

Enumeration of major syntactic categories, or Part's Of Speech. Each POS has a human-readable label that can be used to print it, and a key by which it can be looked up.

Author:
John Didion ,

Enum Constant Summary
ADJECTIVE
           
ADVERB
           
NOUN
           
VERB
           
 
Field Summary
static int ADJECTIVE_SATELLITE_ID
           
static String ADJECTIVE_SATELLITE_KEY
           
 
Method Summary
static List<POS> getAllPOS()
           
 int getId()
          Returns the id for this POS.
 String getKey()
          Returns the key for this POS.
 String getLabel()
          Return a label intended for textual presentation.
static POS getPOSForId(int id)
          Return the POS whose id matches id, or null if the id does not match any POS.
static POS getPOSForKey(String key)
          Return the POS whose key matches key, or null if the key does not match any POS.
static POS getPOSForLabel(String label)
          Return the POS whose key matches label, or null if the label does not match any POS.
 String toString()
           
static POS valueOf(String name)
          Returns the enum constant of this type with the specified name.
static POS[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NOUN

public static final POS NOUN

VERB

public static final POS VERB

ADJECTIVE

public static final POS ADJECTIVE

ADVERB

public static final POS ADVERB
Field Detail

ADJECTIVE_SATELLITE_KEY

public static final String ADJECTIVE_SATELLITE_KEY
See Also:
Constant Field Values

ADJECTIVE_SATELLITE_ID

public static final int ADJECTIVE_SATELLITE_ID
See Also:
Constant Field Values
Method Detail

values

public static POS[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (POS c : POS.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static POS valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getAllPOS

public static List<POS> getAllPOS()

getPOSForLabel

public static POS getPOSForLabel(String label)
Return the POS whose key matches label, or null if the label does not match any POS.

Parameters:
label - POS label
Returns:
POS

getPOSForKey

public static POS getPOSForKey(String key)
Return the POS whose key matches key, or null if the key does not match any POS.

Parameters:
key - key for POS
Returns:
POS

getPOSForId

public static POS getPOSForId(int id)
Return the POS whose id matches id, or null if the id does not match any POS.

Parameters:
id - id for POS
Returns:
POS

toString

public String toString()
Overrides:
toString in class Enum<POS>

getLabel

public String getLabel()
Return a label intended for textual presentation.

Returns:
a label intended for textual presentation

getKey

public String getKey()
Returns the key for this POS.

Returns:
key for this POS

getId

public int getId()
Returns the id for this POS.

Returns:
id for this POS


Copyright © 2013. All Rights Reserved.