首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

drl资料中使用map

2012-06-26 
drl文件中使用mapJAVA代码:Map map1 new HashMap()Map map11 new HashMap()map11.put(name, jack

drl文件中使用map

JAVA代码:

   Map map1 = new HashMap();Map map11 = new HashMap();map11.put("name", "jack");map11.put("address", "xian");map1.put("id", "001");map1.put("money", "5000");map1.put("item", map11);ksession.insert(map1);


规则文件片段:
rule "rule1"when$m:Map(this["id"]=="001",$item:this["item"]!=null)then//获得第二层Map的值System.out.println(((Map)$m.get("item")).get("name"));end

热点排行