Commit d3c7c1c
authored
Add methods to
* Add methods to FieldMap API to make it usable in for-each loop
FieldMap already provides iterator() to inspect all fields, however does not implement Iterable - and so can't be used in for-each loop. This PR adds Iterable interface, as well as groupKeys() which exposes group keys as Iterable.
The motivation for the change is that in some cases it is useful to traverse message as a tree of key-value pairs - e.g. when visualising message structure in UI, or transforming it to another intermediate representation. Being able to iterate in a more idiomatic Collection-like way improves readability of such code.
* Deprecate groupKeyIterator() in favour of groupKeys(). Add javadoc.FieldMap API to make it usable in for-each loop (#347)1 parent c141074 commit d3c7c1c
File tree
3 files changed
+20
-13
lines changed- quickfixj-core/src/main/java/quickfix
3 files changed
+20
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
751 | 750 | | |
752 | 751 | | |
753 | 752 | | |
754 | | - | |
755 | | - | |
756 | | - | |
| 753 | + | |
| 754 | + | |
757 | 755 | | |
758 | 756 | | |
759 | 757 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| 451 | + | |
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
| |||
601 | 602 | | |
602 | 603 | | |
603 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
604 | 609 | | |
605 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
606 | 620 | | |
607 | 621 | | |
608 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
392 | 391 | | |
393 | 392 | | |
394 | 393 | | |
395 | | - | |
396 | | - | |
397 | | - | |
| 394 | + | |
398 | 395 | | |
399 | 396 | | |
400 | 397 | | |
| |||
412 | 409 | | |
413 | 410 | | |
414 | 411 | | |
415 | | - | |
416 | | - | |
417 | | - | |
| 412 | + | |
418 | 413 | | |
419 | 414 | | |
420 | 415 | | |
| |||
0 commit comments