Enum FormatMatcher
- java.lang.Object
-
- java.lang.Enum<FormatMatcher>
-
- org.pepstock.charba.client.intl.enums.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
Two algorithms are available for this negotiation and selected by theDateTimeFormatOptions.setFormatMatcher(org.pepstock.charba.client.intl.enums.FormatMatcher)
property.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
value()
Returns the name value of propertystatic FormatMatcher
valueOf(String name)
Returns the enum constant of this type with the specified name.static FormatMatcher[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BASIC
public static final FormatMatcher BASIC
Basic algorithm to get the format. See Ecma specification for more details.
-
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 nameNullPointerException
- if the argument is null
-
-