Java Map Reverse reverse(Map source, Map target)

Here you can find the source of reverse(Map source, Map target)

Description

reverse

License

Open Source License

Declaration

public static void reverse(Map source, Map target) 

Method Source Code

//package com.java2s;
/*//from  w  w w .j  a va2  s .c  o  m
 *  Copyright (c) 2007 Mockito contributors
 *  This program is made available under the terms of the MIT License.
 */

import java.util.Iterator;

import java.util.Map;

public class Main {
    public static void reverse(Map source, Map target) {
        for (Iterator it = source.keySet().iterator(); it.hasNext();) {
            Object key = it.next();
            target.put(source.get(key), key);
        }
    }
}

Related

  1. reverse( Map map)
  2. reverse(final Map map)
  3. reverse(Map source, Map target)
  4. reverse(Map in)
  5. reverse(Map kvMap)
  6. reverse(Map map)