Java SortedSet mapToSortedSet(Map map)

Here you can find the source of mapToSortedSet(Map map)

Description

map To Sorted Set

License

Open Source License

Declaration

public static SortedSet mapToSortedSet(Map map) 

Method Source Code

//package com.java2s;
/*//w ww . j a  v  a 2 s . co  m
 * Created on 02.11.2004
 * 
 * COPYRIGHT NOTICE
 * 
 * Copyright (C) 2005 DFKI GmbH, Germany
 * Developed by Benedikt Fries, Matthias Klusch
 * 
 * The code is free for non-commercial use only.
 * You can redistribute it and/or modify it under the terms
 * of the Mozilla Public License version 1.1  as
 * published by the Mozilla Foundation at
 * http://www.mozilla.org/MPL/MPL-1.1.txt
 */

import java.util.Iterator;
import java.util.Map;

import java.util.SortedSet;
import java.util.TreeSet;

public class Main {
    public static SortedSet mapToSortedSet(Map map) {
        SortedSet result = new TreeSet();
        Iterator iter = map.entrySet().iterator();
        Map.Entry me;
        while (iter.hasNext()) {
            me = (Map.Entry) iter.next();
            result.add(me.getValue());
        }
        return result;
    }
}

Related

  1. getFlatItems(Map> linkedWorkItemIDsMap)
  2. getSortedIntersectionValues(Collection colection1, Collection colection2)
  3. getSortedTypes(Class[] types)
  4. intersect(SortedSet pSet1, SortedSet pSet2)
  5. intersectSorted(final Collection c1, final Collection c2)
  6. newSortedSet()
  7. setDistance(SortedSet s1, SortedSet s2)
  8. setminus(SortedSet pSet1, SortedSet pSet2)
  9. sorted(Iterable input)