Update SortHashMap.java

This commit is contained in:
Mher Baghinyan 2018-09-16 11:18:22 +04:00 committed by GitHub
parent fdf873daf7
commit 9d9325b972
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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() {