Enum LanguageFormType
- All Implemented Interfaces:
Serializable, Comparable<LanguageFormType>, Constable
High-level categories of language forms used to drive placeholder agreement.
These values correspond to the JSON form names used by selector-based placeholder translations, for example
GENDER or CASE.
- Author:
- Mark Allen
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAnimacy form.Cardinality/plural form.Grammatical case form.Classifier or counter-word form.Clusivity form.Definiteness form.Speech-level or formality form.Grammatical gender form.Ordinality/ordinal-number form.Phonetic form. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull LanguageFormTypeforLanguageForm(@NonNull LanguageForm languageForm) Determines the selector-form type for a concrete language-form value.@NonNull Class<? extends LanguageForm> Gets the concreteLanguageFormclass represented by this type.static LanguageFormTypeReturns the enum constant of this type with the specified name.static LanguageFormType[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
CARDINALITY
Cardinality/plural form. -
ORDINALITY
Ordinality/ordinal-number form. -
GENDER
Grammatical gender form. -
CASE
Grammatical case form. -
DEFINITENESS
Definiteness form. -
CLASSIFIER
Classifier or counter-word form. -
FORMALITY
Speech-level or formality form. -
CLUSIVITY
Clusivity form. -
ANIMACY
Animacy form. -
PHONETIC
Phonetic form.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException- if the argument is null
-
getLanguageFormClass
Gets the concreteLanguageFormclass represented by this type.- Returns:
- the concrete
LanguageFormclass represented by this type, not null
-
forLanguageForm
Determines the selector-form type for a concrete language-form value.- Parameters:
languageForm- the language-form value for which to determine a type, not null- Returns:
- the selector-form type for the supplied language-form value, not null
- Throws:
IllegalArgumentException- if the language form is not recognized
-