Enum PersonNameFormatter.Formality

    • Enum Constant Detail

      • INFORMAL

        public static final PersonNameFormatter.Formality INFORMAL
        The more informal version of the name. In English, this might omit fields or use the "informal" variant of the given name.
        Status:
        Stable ICU 73.
      • DEFAULT

        public static final PersonNameFormatter.Formality DEFAULT
        The default formality for the locale. For most locales, this is the same as FORMAL, but for English, this is the same as INFORMAL.
        Status:
        Stable ICU 74.
    • Method Detail

      • values

        public static PersonNameFormatter.Formality[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PersonNameFormatter.Formality c : PersonNameFormatter.Formality.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PersonNameFormatter.Formality valueOf​(String name)
        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 name
        NullPointerException - if the argument is null