public class TimeRule extends LocaleRule
| Constructor and Description |
|---|
TimeRule()
Creates a rule using the default DateFormat style (SHORT).
|
TimeRule(int style)
Creates a rule using the given DateFormat style.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(String value,
Locale locale)
Check a single input value from this action considering its locale.
|
static TimeRule |
getInstance() |
static TimeRule |
getInstance(int style) |
Map<String,String> |
getTokens()
Returns a map with tokens that can be used in the error messages.
|
checkpublic TimeRule()
public TimeRule(int style)
style - The DateFormat style. (Ex: DateFormat.HOUR_OF_DAY0_FIELD, DateFormat.SHORT, etc.)public static TimeRule getInstance()
public static TimeRule getInstance(int style)
public boolean check(String value, Locale locale)
LocaleRulecheck in class LocaleRulevalue - The value to validate.locale - The locale to consider in the validation.public Map<String,String> getTokens()
RulegetTokens in interface RulegetTokens in class LocaleRuleCopyright © 2015. All Rights Reserved.