Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.List; import java.util.Map; public class Main { private static List<String> filterParamNamesWithObjectValue(Map<String, Object> paramValueMap, List<String> ignoreParamNameList) { List<String> filteredParamNames = new ArrayList<>(paramValueMap.size()); filteredParamNames.addAll(paramValueMap.keySet()); if (ignoreParamNameList != null && ignoreParamNameList.size() > 0) { for (String ignoreParamName : ignoreParamNameList) { filteredParamNames.remove(ignoreParamName); } } return filteredParamNames; } }