Java Map Reverse reverseLabelMap(Map labelMap)

Here you can find the source of reverseLabelMap(Map labelMap)

Description

reverse Label Map

License

Open Source License

Declaration

public static <T> Map<Double, T> reverseLabelMap(Map<T, Double> labelMap) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.HashMap;

import java.util.Map;

public class Main {
    public static <T> Map<Double, T> reverseLabelMap(Map<T, Double> labelMap) {
        Map<Double, T> revMap = new HashMap<Double, T>();

        for (T k : labelMap.keySet()) {
            revMap.put(labelMap.get(k), k);
        }/*from w ww.j  a v a  2s  . c o  m*/
        return revMap;
    }
}

Related

  1. reverse(Map source)
  2. reverse(Map source)
  3. reverse_map(Map map)
  4. reverse_map(Map map)
  5. reverseKeyAndValue(Map map)
  6. reverseMap(List listSeq)
  7. reverseMap(Map map)
  8. reverseMap(Map map)
  9. reverseMap(Map map)