@ThreadSafe @Singleton public final class RegExCache extends Cache<RegExPattern,Pattern>
Pattern objects.| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_CACHE_SIZE
The default number of items to keep in the cache
|
m_aRWLock, STATISTICS_PREFIX| Modifier and Type | Method and Description |
|---|---|
static RegExCache |
getInstance() |
static Pattern |
getPattern(String sRegEx)
Get the cached regular expression pattern.
|
static Pattern |
getPattern(String sRegEx,
int nOptions)
Get the cached regular expression pattern.
|
static boolean |
isInstantiated() |
clearCache, createCache, getFromCache, getFromCacheNoStats, getFromCacheNoStatsNotLocked, getMaxSize, getName, hasMaxSize, isEmpty, isNotEmpty, putInCache, putInCacheNotLocked, removeFromCache, size, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComparatorCollating, getComparatorNamepublic static final int MAX_CACHE_SIZE
public static boolean isInstantiated()
@Nonnull public static RegExCache getInstance()
@Nonnull public static Pattern getPattern(@Nonnull @Nonempty @RegEx String sRegEx)
sRegEx - The regular expression to retrieve. May neither be null
nor empty.null
.IllegalArgumentException - If the passed regular expression has an illegal syntax@Nonnull public static Pattern getPattern(@Nonnull @Nonempty @RegEx String sRegEx, @Nonnegative int nOptions)
sRegEx - The regular expression to retrieve. May neither be null
nor empty.nOptions - The options used for Pattern.compilenull
.IllegalArgumentException - If the passed regular expression has an illegal syntaxPattern.compile(String, int)Copyright © 2014–2019 Philip Helger. All rights reserved.