@Deprecated public class CachingSimplifier extends Object implements SimplifyingSimplifier
This class is thread-safe provided its components are and
setSimplifier(Simplifier)
is not used in a
concurrent context.
StringMetricBuilder
Constructor and Description |
---|
CachingSimplifier(int initialCapacity,
int maximumSize)
Deprecated.
Creates a caching simplifier with
initialCapacity and
maximumSize . |
CachingSimplifier(int initialCapacity,
int maximumSize,
Simplifier simplifier)
Deprecated.
Creates a caching simplifier with
initialCapacity and
maximumSize . |
Modifier and Type | Method and Description |
---|---|
Simplifier |
getSimplifier()
Deprecated.
Gets the simplifier.
|
void |
setSimplifier(Simplifier simplifier)
Deprecated.
Sets the simplifier.
|
String |
simplify(String input)
Deprecated.
Simplifiers the input string.
|
String |
toString()
Deprecated.
|
public CachingSimplifier(int initialCapacity, int maximumSize, Simplifier simplifier)
initialCapacity
and
maximumSize
. Least used cache entries are evicted once the cache
reaches its maximum size.
Uses the delegated simplifier to perform the simplification.
initialCapacity
- initial size of the cachemaximumSize
- maximum size of the cachesimplifier
- the delegate simplifierpublic CachingSimplifier(int initialCapacity, int maximumSize)
initialCapacity
and
maximumSize
. Least used cache entries are evicted once the cache
reaches its maximum size.
Note: A delegated simplifier must be set through through
setSimplifier(Simplifier)
initialCapacity
- initial size of the cachemaximumSize
- maximum size of the cachepublic Simplifier getSimplifier()
Simplifying
getSimplifier
in interface Simplifying
public void setSimplifier(Simplifier simplifier)
Simplifying
setSimplifier
in interface Simplifying
simplifier
- a simplifier to setpublic String simplify(String input)
Simplifier
simplify
in interface Simplifier
input
- string to simplifyCopyright © 2014–2018. All rights reserved.