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

Method getBooks

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

Returns a non-null copy of the Collection of SpellBooks in this SpellBookFacet for the Player Character represented by the given CharID. This method returns an empty Set if no SpellBooks are in this SpellBookFacet for the Player Character identified by the given CharID. This method is value-semanti

(CharID id)

Source from the content-addressed store, hash-verified

280 * the Player Character represented by the given CharID
281 */
282 public Collection<SpellBook> getBooks(CharID id)
283 {
284 Map<String, SpellBook> componentMap = getCachedMap(id);
285 if (componentMap == null)
286 {
287 return Collections.emptySet();
288 }
289 return Collections.unmodifiableCollection(componentMap.values());
290 }
291
292 /**
293 * Returns true if this SpellBookFacet contains a SpellBook of the given

Callers 1

getSpellBooksMethod · 0.80

Calls 2

getCachedMapMethod · 0.95
valuesMethod · 0.45

Tested by

no test coverage detected