class PostFilter {

    public static List<Map<Integer, Integer>> filter(List<List<Integer>> mappings) {
        FinalMappings finalMappings = FinalMappings.getInstance();
        if (mappings != null && !mappings.isEmpty()) {
            finalMappings.set(removeRedundantMapping(mappings));
            mappings.clear();
        } else {
            finalMappings.set(new ArrayList<Map<Integer, Integer>>());
        }
        return finalMappings.getFinalMapping();
    }

}