如何使用lambdaj过滤表?
给定下表:
<>之前我的名字,年龄,男性,薪水1汤姆22 y 3k2 .南希24小时3.5公里3杰克22 y 2k4 jmme 29 y 4k之前如果我应用了滤镜:
age >= 22 && salary > 3k
则得到:
<>之前2 .南希24小时3.5公里4 jmme 29 y 4k之前如您所知,我不能为它创建域类,这使我无法使用以下语法:
filter(having(on(Person.class).getAge(),greaterThan(22)), myManList);
/* *** GDP* 1 2011 北京 1233* 2 2010 天津 2412* 3 2012 上海 1939* 4 2009 深圳 1389* 5 2013 重庆 1492* */Table Table = HashBasedTable.create();aTable。Put ("1", "id", "1");aTable。Put("1",","2011");aTable。Put("1", "北大","北大");aTable。put("1","GDP","1233");aTable。Put ("2", "id", "2");aTable。Put("2",","2010");aTable。Put("2",",");aTable。put("2", "GDP", "2412");aTable。Put ("3", "id", "3");aTable。Put("3",","2012");aTable。Put("3", "拙劣","拙劣");aTable。put("3","GDP","1939");aTable。Put ("4", "id", "4");aTable。Put("4",","2009");aTable。Put("4", "拙劣","拙劣");aTable。put("4", "GDP", "1389");aTable。Put ("5", "id", "5");aTable。Put("5",","2013");aTable。Put("5", "拙劣","拙劣");aTable。put("5","GDP","1492");List> List = filter()在((Map.class) . get("年份"),型号(arrays . aslist (" 2009 ", " 2011 "))), (((Map.class) . get("地区"),型号(arrays . aslist("深圳"))))aTable.rowMap () . values ());System.out.println(李);