Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.HashMap; import java.util.Map; public class Main { public final static String SIGNATURE = "signature"; public final static String SIGN_METHOD = "signMethod"; public static Map<String, String> paraFilter(Map<String, String> para) { Map<String, String> result = new HashMap<String, String>(); if (para == null || para.size() <= 0) { return result; } for (String key : para.keySet()) { String value = para.get(key); if (value == null || value.equals("") || key.equalsIgnoreCase(SIGNATURE) || key.equalsIgnoreCase(SIGN_METHOD)) { continue; } result.put(key, value); } return result; } }