Update SortHashMap.java
This commit is contained in:
parent
fdf873daf7
commit
9d9325b972
|
@ -30,10 +30,10 @@ public class SortHashMap {
|
|||
}
|
||||
|
||||
private static void sortGuava() {
|
||||
final Ordering<String> naturalReverseValueOrdering =
|
||||
Ordering.natural().reverse().nullsLast().onResultOf(Functions.forMap(map, null));
|
||||
final Ordering naturalOrdering =
|
||||
Ordering.natural().onResultOf(Functions.forMap(map, null));
|
||||
|
||||
System.out.println(ImmutableSortedMap.copyOf(map, naturalReverseValueOrdering));
|
||||
System.out.println(ImmutableSortedMap.copyOf(map, naturalOrdering));
|
||||
}
|
||||
|
||||
private static void sortStream() {
|
||||
|
|
Loading…
Reference in New Issue