set benchmark tests
This commit is contained in:
parent
23fc41db24
commit
2d15cb3b49
@ -17,8 +17,16 @@ public class SortHashMap {
|
|||||||
//arrayListSortByValue();
|
//arrayListSortByValue();
|
||||||
//arrayListSortByKey();
|
//arrayListSortByKey();
|
||||||
|
|
||||||
treeSetByKey();
|
//treeSetByKey();
|
||||||
treeSetByValue();
|
//treeSetByValue();
|
||||||
|
|
||||||
|
sortStream();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void sortStream() {
|
||||||
|
map.entrySet().stream()
|
||||||
|
.sorted(Map.Entry.<String, Employee>comparingByKey().reversed())
|
||||||
|
.forEach(System.out::println);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void treeSetByValue() {
|
private static void treeSetByValue() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user