|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.commons.util.defaults.ChainedMapDefault<K,V>
public class ChainedMapDefault<K,V>
This class provides a default implementation which chains maps together. The specified key is looked up in the parent map and the value from that parent mapping is returned.
| Constructor Summary | |
|---|---|
ChainedMapDefault(IMap<K,V> map)
Constructs a new default which looks up missing keys in the specified map. |
|
| Method Summary | |
|---|---|
V |
get(IMap<K,V> map,
K key)
Returns the value to use when the specified key is not valid in the for the mapping. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChainedMapDefault(IMap<K,V> map)
map - the parent map to lookup missing keys in| Method Detail |
|---|
public V get(IMap<K,V> map,
K key)
IMapDefault
get in interface IMapDefault<K,V>map - the map which requested the default value for the given keykey - the key that is not valid for the mapping
org.millscript.commons.util.IMapDefault#get(org.millscript.commons.util.IMap, K)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||