MCPcopy Create free account
hub / github.com/PCGen/pcgen / addToAgeMap

Method addToAgeMap

code/src/java/pcgen/core/BioSet.java:603–618  ·  view source on GitHub ↗

Adds the given AgeSet to this BioSet for the given Region @param region The Region for which the given BioSet should be added @param ageSet The AgeSet to be added to this BioSet for the given Region @param sourceURI The URI indicating the location of the AgeSet in the data @return

(Optional<Region> region, AgeSet ageSet, URI sourceURI)

Source from the content-addressed store, hash-verified

601 * @return
602 */
603 public AgeSet addToAgeMap(Optional<Region> region, AgeSet ageSet, URI sourceURI)
604 {
605 AgeSet old = ageMap.get(region, ageSet.getIndex());
606 if (old != null)
607 {
608 if (ageSet.hasBonuses() || !ageSet.getKits().isEmpty() || !ageSet.getKeyName().equals(old.getKeyName()))
609 {
610 Logging.errorPrint(
611 "Found second (non-identical) AGESET " + "in Bio Settings " + sourceURI + " for Region: "
612 + region.orElse(Region.NONE) + " Index: " + ageSet.getIndex() + " using the existing " + old.getLSTformat());
613 }
614 return old;
615 }
616 ageMap.put(region, ageSet.getIndex(), ageSet);
617 return ageSet;
618 }
619
620 public Integer addToNameMap(AgeSet ageSet)
621 {

Callers 1

parseLineMethod · 0.80

Calls 12

getKeyNameMethod · 0.95
errorPrintMethod · 0.95
getLSTformatMethod · 0.95
hasBonusesMethod · 0.80
getMethod · 0.65
isEmptyMethod · 0.65
getKitsMethod · 0.65
equalsMethod · 0.65
getKeyNameMethod · 0.65
orElseMethod · 0.65
putMethod · 0.65
getIndexMethod · 0.45

Tested by

no test coverage detected