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

Method getCollection

code/src/java/plugin/primitive/domain/DeityToken.java:87–112  ·  view source on GitHub ↗
(PlayerCharacter pc, Converter<Domain, R> c)

Source from the content-addressed store, hash-verified

85 }
86
87 @Override
88 public <R> Collection<R> getCollection(PlayerCharacter pc, Converter<Domain, R> c)
89 {
90 HashSet<R> returnSet = new HashSet<>();
91 Deity deity = (Deity) ChannelUtilities
92 .readControlledChannel(pc.getCharID(), CControl.DEITYINPUT);
93 if (deity == null)
94 {
95 return returnSet;
96 }
97 CDOMReference<DomainList> list = Deity.DOMAINLIST;
98 Collection<CDOMReference<Domain>> mods = deity.getListMods(list);
99 for (CDOMReference<Domain> ref : mods)
100 {
101 Collection<AssociatedPrereqObject> assoc = deity.getListAssociations(list, ref);
102 for (AssociatedPrereqObject apo : assoc)
103 {
104 if (PrereqHandler.passesAll(apo, pc, deity))
105 {
106 returnSet.addAll(c.convert(ref));
107 break;
108 }
109 }
110 }
111 return returnSet;
112 }
113}

Callers

nothing calls this directly

Calls 7

readControlledChannelMethod · 0.95
passesAllMethod · 0.95
getListModsMethod · 0.80
getListAssociationsMethod · 0.80
getCharIDMethod · 0.65
addAllMethod · 0.65
convertMethod · 0.65

Tested by

no test coverage detected