Here you can find the source of sortedKeys(Map
Parameter | Description |
---|---|
map | The map to get the keys for. |
public static SortedSet<String> sortedKeys(Map<String, String> map)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**//from w w w . j a v a2 s .c o m * Returns the keys for the map in a set sorted alphabetically. * <p/> * This is used to help build the signature. * * @param map The map to get the keys for. * @return The keys sorted alphabetically. */ public static SortedSet<String> sortedKeys(Map<String, String> map) { return new TreeSet<String>(map.keySet()); } }