Java Map Merge merge(Map map, K key, V value)

Here you can find the source of merge(Map map, K key, V value)

Description

merge

License

Open Source License

Declaration

public static <K, V> Map<K, V> merge(Map<K, V> map, K key, V value) 

Method Source Code

//package com.java2s;
/*//from  ww  w. ja  v  a 2  s  . c  o m
 * Copyright (c) TESOBE Ltd.  2017. All rights reserved.
 *
 * Use of this source code is governed by a GNU AFFERO license that can be found in the LICENSE file.
 *
 */

import java.util.Map;

public class Main {
    public static <K, V> Map<K, V> merge(Map<K, V> map, K key, V value) {
        map.put(key, value);

        return map;
    }
}

Related

  1. merge(List> list)
  2. merge(Map map1, Map map2)
  3. merge(Map options, Map addition)
  4. merge(Map into, Map with)
  5. merge(Map left, Map right)
  6. merge(Map map, Map... maps)
  7. merge(Map master, Map copy)
  8. merge(Map src, Map dest)
  9. merge(Map first, Map second)