Java8: converti una mappa in un’altra utilizzando lo stream

Ho bisogno di convertire una HashMap Java in un’istanza di TreeMap (incluso il contenuto della mappa)

 HashMap src = ...; TreeMap dest = src.entrySet().stream() .filter( ... ) .collect(Collectors.toMap( ???, ???, ???, TreeMap::new)); 

Cosa dovrei mettere al posto di ??? rendere questo codice compilabile?

Da Collectors.toMap (…) javadoc :

  * @param keyMapper a mapping function to produce keys * @param valueMapper a mapping function to produce values * @param mergeFunction a merge function, used to resolve collisions between * values associated with the same key, as supplied * to {@link Map#merge(Object, Object, BiFunction)} * @param mapSupplier a function which returns a new, empty {@code Map} into * which the results will be inserted 

Per esempio:

 HashMap src = ...; TreeMap dest = src.entrySet().stream() .filter( ... ) .collect(Collectors.toMap(Map.Entry::getKey , Map.Entry::getValue, (a,b) -> a, TreeMap::new));