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

Method unparse

code/src/java/plugin/lsttokens/ability/AspectToken.java:154–174  ·  view source on GitHub ↗
(LoadContext context, Ability ability)

Source from the content-addressed store, hash-verified

152 }
153
154 @Override
155 public String[] unparse(LoadContext context, Ability ability)
156 {
157 MapChanges<AspectName, List<Aspect>> changes = context.getObjectContext().getMapChanges(ability, MapKey.ASPECT);
158 if (changes == null || changes.isEmpty())
159 {
160 return null;
161 }
162 Set<String> set = new TreeSet<>();
163 Set<AspectName> keys = changes.getAdded().keySet();
164 for (AspectName an : keys)
165 {
166 List<Aspect> aspects = changes.getAdded().get(an);
167 for (Aspect q : aspects)
168 {
169 set.add(
170 q.getName() + Constants.PIPE + q.getPCCText());
171 }
172 }
173 return set.toArray(new String[0]);
174 }
175
176 @Override
177 public Class<Ability> getTokenClass()

Callers

nothing calls this directly

Calls 10

getMapChangesMethod · 0.65
getObjectContextMethod · 0.65
isEmptyMethod · 0.65
getAddedMethod · 0.65
getMethod · 0.65
addMethod · 0.65
getNameMethod · 0.65
keySetMethod · 0.45
getPCCTextMethod · 0.45
toArrayMethod · 0.45

Tested by

no test coverage detected