Enum FormatMatcher

  • All Implemented Interfaces:
    Serializable, Comparable<FormatMatcher>, Key

    public enum FormatMatcher
    extends Enum<FormatMatcher>
    implements Key
    The list of formats matching algorithm to use.
    The following properties describe the date-time components to use in formatted output, and their desired representations.
    Implementations are required to support at least the following subsets:
    • weekday, year, month, day, hour, minute, second
    • weekday, year, month, day
    • year, month, day
    • year, month
    • month, day
    • hour, minute, second
    • hour, minute
    Implementations may support other subsets, and requests will be negotiated against all available subset-representation combinations to find the best match.
    Two algorithms are available for this negotiation and selected by the DateTimeFormatOptions.setFormatMatcher(org.pepstock.charba.client.intl.enums.FormatMatcher) property.
    Author:
    Andrea "Stock" Stocchero
    • Enum Constant Detail

      • BEST_FIT

        public static final FormatMatcher BEST_FIT
        Lets the runtime provide a locale that's at least, but possibly more, suited for the request than the result of the basic algorithm.
    • Method Detail

      • values

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

        public static FormatMatcher 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
      • value

        public String value()
        Description copied from interface: Key
        Returns the name value of property
        Specified by:
        value in interface Key
        Returns:
        the name value of property