public final class RuleSetCache
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private int |
cacheSize
The fixed cache size.
|
private int |
capacity
The fixed cache capacity.
|
private java.util.Map<java.lang.Class<?>,FromAnnotationsRuleSet> |
data
The map that implements the LRU cache.
|
private float |
loadFactor
The fixed cache load facor.
|
private static long |
serialVersionUID
This class serialVersionUID.
|
Constructor and Description |
---|
RuleSetCache() |
Modifier and Type | Method and Description |
---|---|
private static void |
checkKey(java.lang.Class<?> key)
Verify that a key is not null.
|
boolean |
containsKey(java.lang.Class<?> key)
Returns true if this cache contains a mapping for the specified key.
|
FromAnnotationsRuleSet |
get(java.lang.Class<?> key)
Returns the value to which the specified key is cached, or null if this
cache contains no mapping for the key.
|
void |
put(java.lang.Class<?> key,
FromAnnotationsRuleSet value)
Associates the specified value with the specified key in this cache.
|
private static final long serialVersionUID
private final int cacheSize
private final float loadFactor
private final int capacity
private final java.util.Map<java.lang.Class<?>,FromAnnotationsRuleSet> data
public boolean containsKey(java.lang.Class<?> key)
key
- key whose presence in this map is to be tested.public FromAnnotationsRuleSet get(java.lang.Class<?> key)
key
- the key has to be checked it is present, it must not be null.public void put(java.lang.Class<?> key, FromAnnotationsRuleSet value)
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.private static void checkKey(java.lang.Class<?> key)
T
- the generic key type.key
- the key object.