F
- The formattable object typeS
- The style typepublic abstract class AbstractTimeFormatHelper<F,S> extends LocaleAwareValueHelper
VALUE_TAG_TYPES
HELPER_TAG_TYPES
configuration
Constructor and Description |
---|
AbstractTimeFormatHelper() |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
defaultFormat(F value,
Locale locale,
TimeZone timeZone) |
void |
execute(Options options)
Execute the helper.
|
protected abstract String |
format(F value,
S style,
Locale locale,
TimeZone timeZone) |
protected abstract String |
format(F value,
String pattern,
Locale locale,
TimeZone timeZone) |
protected abstract F |
getFormattableObject(Object value,
Locale locale,
TimeZone timeZone,
MustacheTagInfo tagInfo) |
protected Set<String> |
getSupportedHashKeys() |
protected TimeZone |
getTimeZone(Options options) |
protected abstract S |
parseStyle(String style,
MustacheTagInfo tagInfo) |
protected MustacheException |
unknownStyle(String style,
MustacheTagInfo tagInfo) |
protected MustacheException |
valueNotAFormattableObject(Object value,
MustacheTagInfo tagInfo) |
getCurrentLocale, getCurrentLocale, getLocale, init
allowedTagTypes
getRequiredHashKeys, numberOfRequiredHashEntries, numberOfRequiredParameters, validate
append, convertAndAppend, convertValue, isSection, isUnescapeVariable, isVariable
checkNotInitialized, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfigurationKeys, init
public void execute(Options options)
Helper
protected Set<String> getSupportedHashKeys()
getSupportedHashKeys
in class LocaleAwareValueHelper
*
to
allow any hash keysprotected abstract String defaultFormat(F value, Locale locale, TimeZone timeZone)
value
- protected abstract String format(F value, S style, Locale locale, TimeZone timeZone)
value
- style
- protected abstract String format(F value, String pattern, Locale locale, TimeZone timeZone)
value
- pattern
- protected abstract S parseStyle(String style, MustacheTagInfo tagInfo)
style
- tagInfo
- protected abstract F getFormattableObject(Object value, Locale locale, TimeZone timeZone, MustacheTagInfo tagInfo)
value
- tagInfo
- MustacheException
- If the given value does not represent a formattable objectprotected TimeZone getTimeZone(Options options)
options
- protected MustacheException valueNotAFormattableObject(Object value, MustacheTagInfo tagInfo)
protected MustacheException unknownStyle(String style, MustacheTagInfo tagInfo)
Copyright © 2017. All rights reserved.