Class MessageFormatValidator

  • All Implemented Interfaces:
    FormatValidator

    class MessageFormatValidator
    extends AbstractFormatValidator
    Represents a MessageFormat string.

    **Note: Currently the format type and format style are not validated

    Date: 14.06.2011

    • Field Detail

      • PATTERN

        public static final java.util.regex.Pattern PATTERN
      • formatParts

        private final java.util.Set<FormatPart> formatParts
      • argumentCount

        private int argumentCount
      • valid

        private boolean valid
      • format

        private final java.lang.String format
    • Constructor Detail

      • MessageFormatValidator

        private MessageFormatValidator​(java.lang.String format)
    • Method Detail

      • argumentCount

        public int argumentCount()
        Description copied from interface: FormatValidator
        The number of arguments needed for the format.
        Returns:
        the number of arguments needed.
      • format

        public java.lang.String format()
        Description copied from interface: FormatValidator
        Returns the format string used for validation.
        Returns:
        the format string.
      • isValid

        public boolean isValid()
        Description copied from interface: FormatValidator
        Returns true of the format is valid, otherwise false.
        Returns:
        true of the format is valid, otherwise false.
      • validate

        private void validate()
      • parameterCheck

        private void parameterCheck​(java.lang.Object... parameters)
      • parameterCheck

        private void parameterCheck​(int parameterCount)
      • init

        private void init()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object