Package com.helger.commons.datetime
Class PDTFormatter.LocalizedDateFormatCache
- java.lang.Object
-
- com.helger.commons.cache.MappedCache<KEYTYPE,KEYTYPE,VALUETYPE>
-
- 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_VALUES
-
Fields inherited from class com.helger.commons.cache.MappedCache
m_aRWLock, NO_MAX_SIZE, STATISTICS_PREFIX
-
-
Constructor Summary
Constructors Constructor Description LocalizedDateFormatCache()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetSourcePattern(PDTFormatter.CacheKey aKey)-
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
-
-
-
-
Method Detail
-
getSourcePattern
@Nonnull public static String getSourcePattern(@Nonnull PDTFormatter.CacheKey aKey)
-
-