(LoadContext context, CDOMObject obj)
| 284 | } |
| 285 | |
| 286 | @Override |
| 287 | public String[] unparse(LoadContext context, CDOMObject obj) |
| 288 | { |
| 289 | AssociatedChanges<CDOMReference<Spell>> changes = |
| 290 | context.getListContext().getChangesInList(getTokenName(), obj, Spell.SPELLS); |
| 291 | List<String> list = new ArrayList<>(); |
| 292 | if (changes.includesGlobalClear()) |
| 293 | { |
| 294 | list.add(Constants.LST_DOT_CLEAR_ALL); |
| 295 | } |
| 296 | MapToList<CDOMReference<Spell>, AssociatedPrereqObject> mtl = changes.getAddedAssociations(); |
| 297 | if (mtl != null && !mtl.isEmpty()) |
| 298 | { |
| 299 | list.addAll(processAdds(context, mtl)); |
| 300 | } |
| 301 | if (list.isEmpty()) |
| 302 | { |
| 303 | return null; |
| 304 | } |
| 305 | return list.toArray(new String[0]); |
| 306 | } |
| 307 | |
| 308 | private Collection<? extends String> processAdds(LoadContext context, |
| 309 | MapToList<CDOMReference<Spell>, AssociatedPrereqObject> mtl) |
nothing calls this directly
no test coverage detected