Code example for Ordering

Methods: immutableSortedCopyonResultOf

0
		} 
		return map;
	} 
 
	public static <T> List<T> sortedKeys(Map<T, ? extends Comparable<?>> map, int elements) {
		List<T> list = Ordering.natural().reverse().onResultOf(Functions.forMap(map)).immutableSortedCopy(map.keySet());
		return list.size() > elements ? list.subList(0, elements) : list;
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java