public enum PhraseCategory extends Enum<PhraseCategory> implements ElementCategory
This enumeration defines the different syntactical phrases. The categories define the well understood roles for each typue of phrase in language. For example, the dog is a noun phrase, the dog chases Mary is a clause, beautiful is an adjective phrase, and so on.
| Enum Constant and Description |
|---|
ADJECTIVE_PHRASE
A phrase relating to an adjective.
|
ADVERB_PHRASE
A phrase relating to an adverb.
|
CANNED_TEXT
A phrase relating to a pre-formed string that is not altered in anyway.
|
CLAUSE
A grammatical clause, the simplest form of which consists of a subject
(noun or noun phrase) and a verb (or verb phrase).
|
NOUN_PHRASE
A phrase relating to a noun.
|
PREPOSITIONAL_PHRASE
A phrase relating to a preposition.
|
VERB_PHRASE
A phrase relating to a verb.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equalTo(Object checkObject)
Checks to see if the given object is equal to this phrase category.
|
static PhraseCategory |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PhraseCategory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PhraseCategory CLAUSE
public static final PhraseCategory ADJECTIVE_PHRASE
public static final PhraseCategory ADVERB_PHRASE
public static final PhraseCategory NOUN_PHRASE
public static final PhraseCategory PREPOSITIONAL_PHRASE
public static final PhraseCategory VERB_PHRASE
public static final PhraseCategory CANNED_TEXT
public static PhraseCategory[] values()
for (PhraseCategory c : PhraseCategory.values()) System.out.println(c);
public static PhraseCategory valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean equalTo(Object checkObject)
Checks to see if the given object is equal to this phrase category. This
is done by checking the enumeration if the object is of the type
PhraseCategory or by converting the object and this category
to strings and comparing the strings.
For example, PhraseCategory.CLAUSE will match another
PhraseCategory.CLAUSE but will also match the string
"clause" as well.
equalTo in interface ElementCategorycheckObject - the object to be checked against.true if the object matches, false
otherwise.Copyright © 2020. All Rights Reserved.