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

Method unparse

code/src/java/plugin/lsttokens/SpellknownLst.java:213–232  ·  view source on GitHub ↗
(LoadContext context, CDOMObject obj)

Source from the content-addressed store, hash-verified

211 }
212
213 @Override
214 public String[] unparse(LoadContext context, CDOMObject obj)
215 {
216 Set<String> set = new TreeSet<>();
217
218 Collection<CDOMReference<? extends CDOMList<?>>> changedClassLists =
219 context.getListContext().getChangedLists(obj, ClassSpellList.class);
220 TripleKeyMapToList<String, Integer, CDOMReference<? extends CDOMList<?>>, CDOMReference<Spell>> classMap =
221 getMap(context, obj, changedClassLists, true);
222 for (String prereqs : classMap.getKeySet())
223 {
224 set.add(processUnparse("CLASS", classMap, prereqs).toString());
225 }
226
227 if (set.isEmpty())
228 {
229 return null;
230 }
231 return set.toArray(new String[0]);
232 }
233
234 @Override
235 public Class<CDOMObject> getTokenClass()

Callers

nothing calls this directly

Calls 9

getMapMethod · 0.80
processUnparseMethod · 0.80
getChangedListsMethod · 0.65
getListContextMethod · 0.65
getKeySetMethod · 0.65
addMethod · 0.65
toStringMethod · 0.65
isEmptyMethod · 0.65
toArrayMethod · 0.45

Tested by

no test coverage detected