Enum MessagePattern.ArgType

  • All Implemented Interfaces:
    Serializable, Comparable<MessagePattern.ArgType>
    Enclosing class:
    MessagePattern

    public static enum MessagePattern.ArgType
    extends Enum<MessagePattern.ArgType>
    Argument type constants. Returned by Part.getArgType() for ARG_START and ARG_LIMIT parts. Messages nested inside an argument are each delimited by MSG_START and MSG_LIMIT, with a nesting level one greater than the surrounding message.
    • Enum Constant Detail

      • SIMPLE

        public static final MessagePattern.ArgType SIMPLE
        The argument has a "simple" type which is provided by the ARG_TYPE part. An ARG_STYLE part might follow that.
      • CHOICE

        public static final MessagePattern.ArgType CHOICE
        The argument is a ChoiceFormat with one or more ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples.
      • PLURAL

        public static final MessagePattern.ArgType PLURAL
        The argument is a cardinal-number PluralFormat with an optional ARG_INT or ARG_DOUBLE offset (e.g., offset:1) and one or more (ARG_SELECTOR [explicit-value] message) tuples. If the selector has an explicit value (e.g., =2), then that value is provided by the ARG_INT or ARG_DOUBLE part preceding the message. Otherwise the message immediately follows the ARG_SELECTOR.
      • SELECT

        public static final MessagePattern.ArgType SELECT
        The argument is a SelectFormat with one or more (ARG_SELECTOR, message) pairs.
      • SELECTORDINAL

        public static final MessagePattern.ArgType SELECTORDINAL
        The argument is an ordinal-number PluralFormat with the same style parts sequence and semantics as PLURAL.
    • Method Detail

      • values

        public static MessagePattern.ArgType[] 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 (MessagePattern.ArgType c : MessagePattern.ArgType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MessagePattern.ArgType 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
      • hasPluralStyle

        public boolean hasPluralStyle()
        Returns:
        true if the argument type has a plural style part sequence and semantics, for example PLURAL and SELECTORDINAL.