Java Map Put putMapBoolean(Map params, String key)

Here you can find the source of putMapBoolean(Map params, String key)

Description

put Map Boolean

License

Open Source License

Parameter

Parameter Description
params a parameter
key a parameter

Declaration

public static boolean putMapBoolean(Map<String, Object> params, String key) 

Method Source Code

//package com.java2s;
/*// www. j av a  2 s.co m
 *
 *  *****************************************************************************
 *  * Copyright ( c ) 2016 Heren Tianjin Inc. All Rights Reserved.
 *  *
 *  * This software is the confidential and proprietary information of Heren Tianjin Inc
 *  * ("Confidential Information").  You shall not disclose such Confidential Information
 *  *  and shall use it only in accordance with the terms of the license agreement
 *  *  you entered into with Heren Tianjin or a Heren Tianjin authorized
 *  *  reseller (the "License Agreement").
 *  ****************************************************************************
 *
 */

import java.util.Map;

public class Main {
    /**
     * @param params
     * @param key
     * @return
     */
    public static boolean putMapBoolean(Map<String, Object> params, String key) {
        return params.containsKey(key) && !params.get(key).equals("");
    }
}

Related

  1. putKV(Map map, String k, Object v)
  2. putLong(Map properties, String key, long value)
  3. putLowerNotNull(Map m, String k, V v)
  4. putMap(Map map, Object... args)
  5. putMap(Map target, Map map)
  6. putMapBooleanList(Map params, String... keys)
  7. putMapByPair(String pair, Map m)
  8. putMapEntry(Map map, String name, String value)
  9. putMapNotNullKey(Map map, K key, V value)