Libraryless. Click here for Pure Java version (2783L/16K).
1 | sS compareMapsVerbose(Map a, Map b) {
|
2 | ret hijackPrint(r {
|
3 | if (a.size() != b.size()) ret with print("Size of map differs");
|
4 | for (O key, O value : (Map<O>) a) {
|
5 | if (!b.containsKey(key)) |
6 | print(key + " not found in map 2"); |
7 | else {
|
8 | O value2 = b.get(key); |
9 | if (!eq(value, value2)) |
10 | print("values for key " + key + " differ");
|
11 | else |
12 | print("values for key " + key + " ok");
|
13 | } |
14 | } |
15 | }); |
16 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031405 |
| Snippet name: | compareMapsVerbose |
| Eternal ID of this version: | #1031405/2 |
| Text MD5: | 37314d0898fb48ab39be4f371a3d3a07 |
| Transpilation MD5: | cd015d1a5768029c0a7366a696be4fe3 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-06-11 17:01:12 |
| Source code size: | 473 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 334 / 460 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |