@@ -57,4 +57,26 @@ In `Map.Entry`:
57
57
* ` default V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) `
58
58
* ` default V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) `
59
59
* ` default V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) `
60
- * ` default V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) `
60
+ * ` default V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) `
61
+
62
+ # project description
63
+ We provide tests for above mentioned methods.
64
+
65
+ 1 . comparing
66
+ * sort entry set stream by keys
67
+ ```
68
+ stream.sorted(Map.Entry.comparingByKey())
69
+ ```
70
+ * sort entry set stream by keys in reverse order
71
+ ```
72
+ stream.sorted(Map.Entry.comparingByKey((x, y) -> Integer.compare(y, x)))
73
+ ```
74
+ * sort entry set stream by values
75
+ ```
76
+ stream.sorted(Map.Entry.comparingByValue(Comparator.comparingInt(p -> p.getHobbies().size())))
77
+ ```
78
+ * sort entry set stream by values in reverse order
79
+ ```
80
+ .sorted(Map.Entry.comparingByValue(Comparator.<Person>comparingInt(p -> p.getHobbies().size()).reversed()))
81
+ ```
82
+ 1. processing
0 commit comments