Java Map Remove removePrivateColumns( Map contentValues)

Here you can find the source of removePrivateColumns( Map contentValues)

Description

removes Key

License

Apache License

Parameter

Parameter Description
contentValues a parameter

Declaration

private static Map<String, Object> removePrivateColumns(
        Map<String, Object> contentValues) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.HashMap;

import java.util.Map;

public class Main {
    /**/* w w  w.  ja va 2  s .co m*/
     *  removes Key
     * @param contentValues
     * @return
     */
    private static Map<String, Object> removePrivateColumns(
            Map<String, Object> contentValues) {

        HashMap<String, Object> result = new HashMap<String, Object>();

        Object[] keySet = (contentValues.keySet().toArray());

        for (int i = 0; i < keySet.length; i++) {
            String name = (String) keySet[i];
            Object value = contentValues.get(name);
            if (!"Key".equals(name)) {
                result.put(name, value);
            }
        }
        return result;
    }
}

Related

  1. removeObject(Map map, T key)
  2. removeObjectProperty(Map properties, String key, Object defaultValue)
  3. removeOutStringsStrings(Map map, String newString)
  4. removeParamsForAlipaySign(Map map)
  5. removeParentBeans(Map parentBeans, Map beans)
  6. removeRownum(List> rows)
  7. removeTrailingNumber(Map names)
  8. removeValue(final Map map, final Object key, final Object value)
  9. removeValue(Map subject, String property, Map value, boolean propertyIsArray)