(final TripleKeyMapToList<Optional<Region>, String, String, String> argMap, Optional<Region> region, final String argRaceName, final String addKey, final String altRaceName)
| 561 | } |
| 562 | |
| 563 | private List<String> mapFind(final TripleKeyMapToList<Optional<Region>, String, String, String> argMap, |
| 564 | Optional<Region> region, final String argRaceName, final String addKey, final String altRaceName) |
| 565 | { |
| 566 | // First check for region.racename.key |
| 567 | List<String> r = argMap.getListFor(region, argRaceName, addKey); |
| 568 | if (r != null && !r.isEmpty()) |
| 569 | { |
| 570 | return r; |
| 571 | } |
| 572 | // |
| 573 | // If not found, try the race name without any parenthesis |
| 574 | // |
| 575 | final int altRaceLength = altRaceName.length(); |
| 576 | |
| 577 | if (altRaceLength != 0) |
| 578 | { |
| 579 | r = argMap.getListFor(region, altRaceName, addKey); |
| 580 | |
| 581 | if (r != null) |
| 582 | { |
| 583 | return r; |
| 584 | } |
| 585 | } |
| 586 | // |
| 587 | // If still not found, try the same two searches again without a region |
| 588 | // |
| 589 | if (region.isPresent()) |
| 590 | { |
| 591 | return mapFind(argMap, Optional.empty(), argRaceName, addKey, altRaceName); |
| 592 | } |
| 593 | return r; |
| 594 | } |
| 595 | |
| 596 | /** |
| 597 | * Adds the given AgeSet to this BioSet for the given Region |
no test coverage detected