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

Method processRemoval

code/src/java/pcgen/io/PCGVer2Parser.java:5778–5802  ·  view source on GitHub ↗
(CNAbility langbonus, HashMapToList<Language, Object> sources,
		Map<Object, Integer> actorLimit, Map<PersistentTransitionChoice, CDOMObject> ptcSources, Language l,
		Object actor)

Source from the content-addressed store, hash-verified

5776 }
5777
5778 private void processRemoval(CNAbility langbonus, HashMapToList<Language, Object> sources,
5779 Map<Object, Integer> actorLimit, Map<PersistentTransitionChoice, CDOMObject> ptcSources, Language l,
5780 Object actor)
5781 {
5782 Integer limit = actorLimit.get(actor);
5783 //apply
5784 processActor(langbonus, ptcSources, l, actor);
5785 cachedLanguages.remove(l);
5786 sources.removeListFor(l);
5787 //Remove this sources from all languages (may create more items with only one source)
5788 if (limit == 1)
5789 {
5790 for (Language lang : sources.getKeySet())
5791 {
5792 sources.removeFromListFor(lang, actor);
5793 }
5794 //Used up
5795 actorLimit.remove(actor);
5796 }
5797 else
5798 {
5799 //Use a slot
5800 actorLimit.put(actor, limit - 1);
5801 }
5802 }
5803
5804 private void processActor(CNAbility langbonus, Map<PersistentTransitionChoice, CDOMObject> ptcSources, Language l,
5805 Object actor)

Callers 1

resolveLanguagesMethod · 0.95

Calls 7

processActorMethod · 0.95
getMethod · 0.65
removeMethod · 0.65
removeListForMethod · 0.65
getKeySetMethod · 0.65
removeFromListForMethod · 0.65
putMethod · 0.65

Tested by

no test coverage detected