Package net.n2oapp.criteria.dataset
Class NestedMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<String,Object>
-
- net.n2oapp.criteria.dataset.NestedMap
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
- Direct Known Subclasses:
DataSet
public class NestedMap extends LinkedHashMap<String,Object>
It's implementation of access to aMapas JavaScript objects Example 1:Map map = new NestedMap(); map.put("foo.bar", 1); assert ((Map)map.get("foo")).get("bar").equals(1); assert map.get("foo.bar").equals(1);Example 2:
Map map = new NestedMap(); map.put("foo[0].bar", 1); assert ((Map)((List)map.get("foo")).get(0)).get("bar").equals(1); assert map.get("foo[0].bar").equals(1);- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(Object oKey)protected NestedListcreateNestedList(List list)protected NestedMapcreateNestedMap(Map map)Objectget(Object oKey)Objectput(String key, Object value)voidputAll(Map<? extends String,?> m)Objectremove(Object oKey)-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putIfAbsent, remove, replace, replace, size
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, hashCode, isEmpty, merge, putIfAbsent, remove, replace, replace, size
-
-
-
-
Method Detail
-
containsKey
public boolean containsKey(Object oKey)
- Specified by:
containsKeyin interfaceMap<String,Object>- Overrides:
containsKeyin classHashMap<String,Object>
-
createNestedList
protected NestedList createNestedList(List list)
-
-