de.unihd.dbs.uima.annotator.heideltime.resources
public class RegexHashMap<T> extends java.lang.Object implements java.util.Map<java.lang.String,T>
Constructor and Description |
---|
RegexHashMap() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
clears both the container and the cache hashmaps
|
boolean |
containsKey(java.lang.Object key)
checks whether the cache or container contain a specific key, then evaluates the
container's keys as regexes and checks whether they match the specific key.
|
boolean |
containsValue(java.lang.Object value)
checks whether a specific value is container within either container or cache
|
java.util.Set<java.util.Map.Entry<java.lang.String,T>> |
entrySet()
returns a merged entryset containing within both the container and cache entrysets
|
T |
get(java.lang.Object key)
checks whether the requested key has a direct match in either cache or container, and if it
doesn't, also evaluates the container's keyset as regexes to match against the input key and
if any of those methods yield a value, returns that value
if a value is found doing regex evaluation, use that regex-key's match as a non-regex
key with the regex's value to form a new entry in the cache.
|
boolean |
isEmpty()
checks whether both container and cache are empty
|
java.util.Set<java.lang.String> |
keySet()
returns the keysets of both the container and cache hashmaps
|
T |
put(java.lang.String key,
T value)
associates a key with a value in the container hashmap
|
void |
putAll(java.util.Map<? extends java.lang.String,? extends T> m)
adds a map to the container
|
T |
putCache(java.lang.String key,
T value)
associates a key with a value in the cache hashmap.
|
T |
remove(java.lang.Object key)
removes a specific key's association from the container
|
int |
size()
returns the combined size of container and cache
|
java.util.Collection<T> |
values()
returns the combined collection of both the values of the container as well as
the cache.
|
public void clear()
clear
in interface java.util.Map<java.lang.String,T>
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<java.lang.String,T>
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<java.lang.String,T>
public java.util.Set<java.util.Map.Entry<java.lang.String,T>> entrySet()
entrySet
in interface java.util.Map<java.lang.String,T>
public T get(java.lang.Object key)
get
in interface java.util.Map<java.lang.String,T>
public boolean isEmpty()
isEmpty
in interface java.util.Map<java.lang.String,T>
public java.util.Set<java.lang.String> keySet()
keySet
in interface java.util.Map<java.lang.String,T>
public T put(java.lang.String key, T value)
put
in interface java.util.Map<java.lang.String,T>
public T putCache(java.lang.String key, T value)
key
- Key to map fromvalue
- Value to map topublic void putAll(java.util.Map<? extends java.lang.String,? extends T> m)
putAll
in interface java.util.Map<java.lang.String,T>
public T remove(java.lang.Object key)
remove
in interface java.util.Map<java.lang.String,T>
public int size()
size
in interface java.util.Map<java.lang.String,T>