Class FormatCache<F extends Format>
java.lang.Object
org.miaixz.bus.core.center.date.format.FormatCache<F>
- Type Parameters:
F- 对象类型
日期格式化器缓存
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract FcreateInstance(String pattern, TimeZone timeZone, Locale locale) 创建格式化器使用默认的pattern、timezone和locale获得缓存中的实例getInstance(String pattern, TimeZone timeZone, Locale locale) 使用 pattern, time zone and locale 获得对应的 格式化器
-
Constructor Details
-
FormatCache
public FormatCache()
-
-
Method Details
-
getInstance
使用默认的pattern、timezone和locale获得缓存中的实例- Returns:
- a date/time format
-
getInstance
使用 pattern, time zone and locale 获得对应的 格式化器- Parameters:
pattern- 非空日期格式,使用与SimpleDateFormat相同格式timeZone- 时区,默认当前时区locale- 地区,默认使用当前地区- Returns:
- 格式化器
- Throws:
IllegalArgumentException- pattern 无效或null
-
createInstance
创建格式化器- Parameters:
pattern- 非空日期格式,使用与SimpleDateFormat相同格式timeZone- 时区,默认当前时区locale- 地区,默认使用当前地区- Returns:
- 格式化器
- Throws:
IllegalArgumentException- pattern 无效或null
-