Enum Cardinality

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

public enum Cardinality extends Enum<Cardinality> implements LanguageForm
Language plural cardinality forms.

For example, English has two: 1 dog, 2 dogs, while Welsh has many: 0 cŵn, 1 ci, 2 gi, 3 chi, 4 ci.

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

Per the CLDR:

These categories are only mnemonics -- the names don't necessarily imply the exact contents of the category. For example, for both English and French the number 1 has the category one (singular).

In English, every other number has a plural form, and is given the category other. French is similar, except that the number 0 also has the category one and not other or zero, because the form of units qualified by 0 is also singular.

This is worth emphasizing: A common mistake is to think that "one" is only for only the number 1. Instead, "one" is a category for any number that behaves like 1. So in some languages, for example, one → numbers that end in "1" (like 1, 21, 151) but that don't end in 11 (like "11, 111, 10311).

Author:
Mark Allen
  • Enum Constant Details

    • ZERO

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

      For example: the Welsh 0 cŵn, 0 cathod means 0 dogs, 0 cats in English.

    • ONE

      public static final Cardinality ONE
      The form used with 1.

      For example: the Welsh 1 ci, 1 gath means 1 dog, 1 cat in English.

    • TWO

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

      For example: the Welsh 2 gi, 2 gath means 2 dogs, 2 cats in English.

    • FEW

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

      For example: the Welsh 3 chi, 3 cath means 3 dogs, 3 cats in English.

    • MANY

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

      For example: the Welsh 6 chi, 6 chath means 6 dogs, 6 cats in English.

    • OTHER

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

      For example: the Welsh 4 ci, 4 cath means 4 dogs, 4 cats in English.

  • Method Details