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

Method getAbilityKeyed

code/src/java/pcgen/core/PlayerCharacter.java:7611–7635  ·  view source on GitHub ↗
(AbilityCategory aCategory, String aKey)

Source from the content-addressed store, hash-verified

7609 }
7610
7611 public Ability getAbilityKeyed(AbilityCategory aCategory, String aKey)
7612 {
7613 for (Ability ability : getAbilityList(aCategory, Nature.NORMAL))
7614 {
7615 if (ability.getKeyName().equals(aKey))
7616 {
7617 return ability;
7618 }
7619 }
7620 for (Ability ability : getAbilityList(aCategory, Nature.VIRTUAL))
7621 {
7622 if (ability.getKeyName().equals(aKey))
7623 {
7624 return ability;
7625 }
7626 }
7627 for (Ability ability : getAbilityList(aCategory, Nature.AUTOMATIC))
7628 {
7629 if (ability.getKeyName().equals(aKey))
7630 {
7631 return ability;
7632 }
7633 }
7634 return null;
7635 }
7636
7637 public boolean hasAbilityKeyed(final Category<Ability> cat, final String aKey)
7638 {

Callers 1

getBonusFromNameMethod · 0.80

Calls 3

getAbilityListMethod · 0.95
equalsMethod · 0.65
getKeyNameMethod · 0.65

Tested by

no test coverage detected