Package com.helger.commons.datetime
Class PDTFormatter.LocalizedDateFormatCache
java.lang.Object
com.helger.commons.cache.MappedCache<PDTFormatter.CacheKey,PDTFormatter.CacheKey,DateTimeFormatter>
com.helger.commons.cache.Cache<PDTFormatter.CacheKey,DateTimeFormatter>
com.helger.commons.datetime.PDTFormatter.LocalizedDateFormatCache
- All Implemented Interfaces:
ICache<PDTFormatter.CacheKey,,DateTimeFormatter> IMutableCache<PDTFormatter.CacheKey,,DateTimeFormatter> IHasSize,IHasName
- Enclosing class:
PDTFormatter
@ThreadSafe
public static final class PDTFormatter.LocalizedDateFormatCache
extends Cache<PDTFormatter.CacheKey,DateTimeFormatter>
This class caches the compiled patterns for localized date and time
formatter. Using e.g.
DateTimeFormatter.ofLocalizedDate(java.time.format.FormatStyle) is
not an option because the used "year of era", corresponding to pattern "y"
makes problems. Instead "year" with the pattern "u" must be used for best
backwards compatibility.- Author:
- Philip Helger
-
Field Summary
Fields inherited from class com.helger.commons.cache.Cache
DEFAULT_ALLOW_NULL_VALUESFields inherited from class com.helger.commons.cache.MappedCache
m_aRWLock, NO_MAX_SIZE, STATISTICS_PREFIX -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.helger.commons.cache.MappedCache
clearCache, createCache, getCacheKeyProvider, getFromCache, getFromCacheNoStats, getFromCacheNoStatsNotLocked, getMaxSize, getName, getValueProvider, hasMaxSize, isAllowNullValues, isEmpty, isInCache, isNotEmpty, putInCache, putInCacheNotLocked, removeFromCache, size, toString
-
Constructor Details
-
LocalizedDateFormatCache
public LocalizedDateFormatCache()
-
-
Method Details
-
getSourcePattern
-