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

Method unparse

code/src/java/plugin/lsttokens/kit/gear/EqmodToken.java:126–146  ·  view source on GitHub ↗
(LoadContext context, KitGear kitGear)

Source from the content-addressed store, hash-verified

124 }
125
126 @Override
127 public String[] unparse(LoadContext context, KitGear kitGear)
128 {
129 if (!kitGear.hasEqMods())
130 {
131 return null;
132 }
133 Set<String> set = new TreeSet<>();
134 for (EqModRef modRef : kitGear.getEqMods())
135 {
136 String key = modRef.getRef().getLSTformat(false);
137 StringBuilder sb = new StringBuilder();
138 sb.append(key);
139 for (String s : modRef.getChoices())
140 {
141 sb.append(Constants.PIPE).append(s);
142 }
143 set.add(sb.toString());
144 }
145 return new String[]{StringUtil.join(set, Constants.DOT)};
146 }
147}

Callers

nothing calls this directly

Calls 9

joinMethod · 0.95
hasEqModsMethod · 0.80
getEqModsMethod · 0.80
getLSTformatMethod · 0.65
getChoicesMethod · 0.65
addMethod · 0.65
toStringMethod · 0.65
getRefMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected