Commit 618d43d
committed
refactor(iban): derive iban length and end indices from patterns
Remove redundant data from IbanRegistry's enum constants:
- IBAN length is now computed from the BBAN pattern instead of an
explicit withIbanLength(...) call.
- withBankCode/withBranchCode/withAccountNumber/withNationalCheckDigit
now take (pattern, beginIndex); the end index is derived from the
pattern's segment length.
- StructureData stores its four positional components in an internal
ComponentType -> Component map instead of eight parallel fields;
public getters keep their existing signatures.
- IbanPatternConverter.Segment's static list helpers (calculateTotalLength,
allMatch, isAllNumeric) moved onto IbanPatternConverter itself; Segment
stays a pure value object.
- Updated call sites in IbanBuilder and the related tests accordingly.1 parent 0847a0e commit 618d43d
25 files changed
Lines changed: 1700 additions & 1262 deletions
File tree
- iban-commons/src
- main/java/de/speedbanking/iban
- util
- test/java/de/speedbanking
- bic
- iban
- tool
- util
- util
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
928 | | - | |
929 | | - | |
| 928 | + | |
| 929 | + | |
930 | 930 | | |
931 | 931 | | |
932 | | - | |
933 | | - | |
| 932 | + | |
934 | 933 | | |
935 | 934 | | |
936 | 935 | | |
| |||
Lines changed: 27 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
409 | 408 | | |
410 | 409 | | |
411 | 410 | | |
412 | | - | |
413 | | - | |
| 411 | + | |
| 412 | + | |
414 | 413 | | |
415 | 414 | | |
416 | 415 | | |
| |||
423 | 422 | | |
424 | 423 | | |
425 | 424 | | |
426 | | - | |
427 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
428 | 430 | | |
429 | 431 | | |
430 | 432 | | |
| |||
456 | 458 | | |
457 | 459 | | |
458 | 460 | | |
459 | | - | |
| 461 | + | |
460 | 462 | | |
461 | 463 | | |
462 | 464 | | |
| |||
469 | 471 | | |
470 | 472 | | |
471 | 473 | | |
472 | | - | |
473 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
474 | 479 | | |
475 | 480 | | |
476 | 481 | | |
| |||
538 | 543 | | |
539 | 544 | | |
540 | 545 | | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
545 | 550 | | |
546 | 551 | | |
547 | 552 | | |
| |||
550 | 555 | | |
551 | 556 | | |
552 | 557 | | |
553 | | - | |
554 | | - | |
| 558 | + | |
| 559 | + | |
555 | 560 | | |
556 | | - | |
557 | | - | |
558 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
559 | 564 | | |
560 | 565 | | |
561 | | - | |
562 | | - | |
| 566 | + | |
| 567 | + | |
563 | 568 | | |
564 | | - | |
565 | | - | |
566 | | - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
567 | 572 | | |
568 | 573 | | |
569 | 574 | | |
| |||
0 commit comments