Enum Ordinality

java.lang.Object
java.lang.Enum<Ordinality>
com.lokalized.Ordinality
All Implemented Interfaces:
LanguageForm, Serializable, Comparable<Ordinality>, Constable

public enum Ordinality extends Enum<Ordinality> implements LanguageForm
Language plural ordinality forms.

For example, English has four: 1st, 2nd, 3rd, 4th, while Swedish has two: 1:a, 3:e.

See the Unicode Common Locale Data Repository and its Language Plural Rules for details.

CLDR category names are mnemonics whose membership is locale-specific; they do not imply cardinal singular or plural meaning. For English ordinals, values ending in 1, 2, or 3 normally select ONE, TWO, or FEW, except for values ending in 11, 12, or 13; remaining values select OTHER. French ordinals use ONE for 1 and OTHER for other values. Applications should always use the generated locale rules rather than inferring ordinal categories from their names.

Author:
Mark Allen
  • Enum Constant Details

    • ZERO

      public static final Ordinality ZERO
      Normally the form used with 0, if it is limited to numbers whose integer values end with 0.

      For example: the Welsh 0fed ci means "0th dog" in English.

    • ONE

      public static final Ordinality ONE
      The form used with 1.

      For example: the Welsh ci 1af means 1st dog in English.

    • TWO

      public static final Ordinality TWO
      Normally the form used with 2, if it is limited to numbers whose integer values end with 2.

      For example: the Welsh 2il gi means 2nd dog in English.

    • FEW

      public static final Ordinality FEW
      The form that falls between TWO and MANY.

      For example: the Welsh 3ydd ci means 3rd dog in English.

    • MANY

      public static final Ordinality MANY
      The form that falls between FEW and OTHER.

      For example: the Welsh 5ed ci means 5th dog in English.

    • OTHER

      public static final Ordinality OTHER
      General "catchall" form which comprises any cases not handled by the other forms.

      For example: the Welsh ci rhif 10 means 10th dog in English.

  • Method Details