We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cd6172 commit a447b98Copy full SHA for a447b98
README.md
@@ -46,9 +46,9 @@ In `Map.Entry`:
46
47
## processing
48
* `default void forEach(BiConsumer<? super K, ? super V> action)`
49
+* `default V getOrDefault(Object key, V defaultValue)`
50
51
# modifying
-* `default V getOrDefault(Object key, V defaultValue)`
52
* `default V putIfAbsent(K key, V value)`
53
* `default boolean remove(Object key, Object value)`
54
* `default void replaceAll(BiFunction<? super K, ? super V, ? extends V> function)`
@@ -83,4 +83,17 @@ We provide tests for above mentioned methods.
83
* print all entries
84
```
85
customerMap.forEach((key, value) -> System.out.println(key + ": " + value));
86
- ```
+ ```
87
+ * get customer (id = 1) from map or default to EMPTY customer
88
89
+ @Value
90
+ class Customer {
91
+ public static final Customer EMPTY = new Customer(0);
92
+
93
+ Integer id;
94
+ }
95
96
97
+ customerMap.getOrDefault(1, Customer.EMPTY);
98
99
+1. modifying
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments