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

Method add

code/src/java/pcgen/cdom/facet/SpellBookFacet.java:138–144  ·  view source on GitHub ↗

Add the given SpellBook to the list of SpellBooks stored in this SpellBookFacet for the Player Character represented by the given CharID. @param id The CharID representing the Player Character for which the given item should be added @param sb The SpellBook to be ad

(CharID id, SpellBook sb)

Source from the content-addressed store, hash-verified

136 * the given CharID
137 */
138 public void add(CharID id, SpellBook sb)
139 {
140 Objects.requireNonNull(sb, "Object to add may not be null");
141 Map<String, SpellBook> sbMap = getConstructingCachedMap(id);
142 String name = sb.getName();
143 sbMap.put(name, sb);
144 }
145
146 /**
147 * Removes all of the SpellBooks in the given Collection from the list of

Callers 2

dataAddedMethod · 0.95
addAllMethod · 0.95

Calls 3

getNameMethod · 0.65
putMethod · 0.65

Tested by

no test coverage detected