@Test public void testFilter() { List<Integer> l1 = new ArrayList<Integer>(6); l1.add(1); l1.add(2); l1.add(3); l1.add(4); l1.add(5); l1.add(6); List<Integer> l2 = new ArrayList<Integer>(6); l2.add(1); l2.add(2); l2.add(3); l2.add(4); l2.add(5); l2.add(6); List<Integer> l3 = new ArrayList<Integer>(6); l3.add(1); l3.add(2); l3.add(5); l3.add(4); l3.add(3); l3.add(6); List<List<Integer>> mappings = new ArrayList<List<Integer>>(3); mappings.add(l1); mappings.add(l2); mappings.add(l3); assertEquals(3, mappings.size()); List<Map<Integer, Integer>> expResult = PostFilter.filter(mappings); assertEquals(2, expResult.size()); }
public synchronized static List<Map<Integer, Integer>> filter(List<List<Integer>> mappings) { List<Map<Integer, Integer>> final_MAPPINGS = new ArrayList<>(); if (mappings != null && !mappings.isEmpty()) { List<Map<Integer, Integer>> removeRedundantMapping = removeRedundantMapping(mappings); final_MAPPINGS.addAll(removeRedundantMapping); } return final_MAPPINGS; }
PostFilter { public synchronized static List<Map<Integer, Integer>> filter(List<List<Integer>> mappings) { List<Map<Integer, Integer>> final_MAPPINGS = new ArrayList<>(); if (mappings != null && !mappings.isEmpty()) { List<Map<Integer, Integer>> removeRedundantMapping = removeRedundantMapping(mappings); final_MAPPINGS.addAll(removeRedundantMapping); } return final_MAPPINGS; } }
PostFilter { public synchronized static List<Map<Integer, Integer>> filter(List<List<Integer>> mappings) { List<Map<Integer, Integer>> final_MAPPINGS = new ArrayList<>(); if (mappings != null && !mappings.isEmpty()) { List<Map<Integer, Integer>> removeRedundantMapping = removeRedundantMapping(mappings); final_MAPPINGS.addAll(removeRedundantMapping); } return final_MAPPINGS; }  }
PostFilter { public synchronized static List<Map<Integer, Integer>> filter(List<List<Integer>> mappings) { List<Map<Integer, Integer>> final_MAPPINGS = new ArrayList<>(); if (mappings != null && !mappings.isEmpty()) { List<Map<Integer, Integer>> removeRedundantMapping = removeRedundantMapping(mappings); final_MAPPINGS.addAll(removeRedundantMapping); } return final_MAPPINGS; }  synchronized static List<Map<Integer, Integer>> filter(List<List<Integer>> mappings); }
PostFilter { public synchronized static List<Map<Integer, Integer>> filter(List<List<Integer>> mappings) { List<Map<Integer, Integer>> final_MAPPINGS = new ArrayList<>(); if (mappings != null && !mappings.isEmpty()) { List<Map<Integer, Integer>> removeRedundantMapping = removeRedundantMapping(mappings); final_MAPPINGS.addAll(removeRedundantMapping); } return final_MAPPINGS; }  synchronized static List<Map<Integer, Integer>> filter(List<List<Integer>> mappings);  }