Package limn.i18n

Enum Class PluralRules.Category

java.lang.Object
java.lang.Enum<PluralRules.Category>
limn.i18n.PluralRules.Category
All Implemented Interfaces:
Serializable, Comparable<PluralRules.Category>, Constable
Enclosing class:
PluralRules

public static enum PluralRules.Category extends Enum<PluralRules.Category>
CLDR's six cardinal categories. A language uses a subset; every language uses OTHER for at least something, except where an integer can never reach it (Polish and Russian, whose other is a fraction's).

A 1.x minor release may add constants to this enum: a switch over it needs a default branch.

  • Enum Constant Details

    • ZERO

      public static final PluralRules.Category ZERO
      Arabic's zero. Not "no items": a form a language uses for the number 0.
    • ONE

      public static final PluralRules.Category ONE
      The singular, where a language has one.
    • TWO

      public static final PluralRules.Category TWO
      The dual: Arabic and Hebrew.
    • FEW

      public static final PluralRules.Category FEW
      The small plural: Czech's 2–4, Polish's and Russian's 2–4 by last digit.
    • MANY

      public static final PluralRules.Category MANY
      The large plural: Polish's and Russian's 5–20 by last digits, Arabic's 11–99.
    • OTHER

      public static final PluralRules.Category OTHER
      Everything else, and the only form in languages that do not inflect for number.
  • Method Details

    • values

      public static PluralRules.Category[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PluralRules.Category valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • suffix

      public String suffix()
      The suffix this category takes in a catalog key: …loadedAnnouncement.few.