public class GeneratorMap<T> extends Object implements Map<String,T>, Serializable
Generator
.
If a value does not exist for a given string, one will be automatically
generated using a provided Generator
.Constructor and Description |
---|
GeneratorMap(Generator<T> generator)
Creates a new
GeneratorMap using a ConcurrentHashMap . |
GeneratorMap(Generator<T> generator,
Map<String,T> map)
Creates a new
GeneratorMap using a the provided map}. |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,T>> |
entrySet() |
boolean |
equals(Object o) |
T |
get(Object term)
Returns a
T for the given term, if no mapping for
term then a new vaue is generated, stored, and returned. |
int |
hashCode() |
boolean |
isEmpty() |
Set<String> |
keySet() |
T |
put(String key,
T vector)
Unsupported.
|
void |
putAll(Map<? extends String,? extends T> m)
Unsupported.
|
T |
remove(Object key) |
int |
size() |
Collection<T> |
values() |
public boolean containsKey(Object key)
containsKey
in interface Map<String,T>
public boolean containsValue(Object value)
containsValue
in interface Map<String,T>
public boolean equals(Object o)
public T get(Object term)
T
for the given term, if no mapping for
term
then a new vaue is generated, stored, and returned.public int hashCode()
Copyright © 2012. All Rights Reserved.