I have a list of map objects. These map objects have properties/keys like id, condition\_1, condition\_2 etc. A sample map looks like so,

```
List<Map<String, Object>> allItems = Lists.newArrayList();

Map<String, Object> paramsMap = Maps.newHashMap();

paramsMap.put("id", "a");
paramsMap.put("condition_1", false);
paramsMap.put("condition_2", true);
paramsMap.put("condition_3", false);

allItems.add(paramsMap);

```

So, I need to filter the `allItems` object such that it has only those map objects which have `condition_1 = true` & `condition_2 = false`, & so on & so forth.

I thought about using apache commons [CollectionUtils.filter](http://commons.apache.org/proper/commons-collections/javadocs/api-release/org/apache/commons/collections4/CollectionUtils.html#filter(java.lang.Iterable,%20org.apache.commons.collections4.Predicate)) but that doesn't seem to solve my problem because I have no way of specifying map entries as filter conditions.

I am not averse to using Google Guava as well, but I was unable to find a good solution.

Basically I am trying to mimic the [`_.where`](http://documentcloud.github.io/underscore/#where) functionality found in the excellent JavaScript library underscore.js.