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

Method writeTemplateFeat

code/src/java/pcgen/io/PCGVer2Creator.java:2509–2526  ·  view source on GitHub ↗
(StringBuilder aString, PCTemplate pct, List<? extends CNAbilitySelection> featList)

Source from the content-addressed store, hash-verified

2507 }
2508
2509 private void writeTemplateFeat(StringBuilder aString, PCTemplate pct, List<? extends CNAbilitySelection> featList)
2510 {
2511 for (CNAbilitySelection s : featList)
2512 {
2513 if (aString.length() != 0)
2514 {
2515 aString.append('|');
2516 }
2517
2518 String featKey = Compatibility.getKeyFor(pct);
2519
2520 aString.append(IOConstants.TAG_CHOSENFEAT).append(':');
2521 aString.append('[');
2522 aString.append(IOConstants.TAG_MAPKEY).append(':').append(EntityEncoder.encode(featKey)).append('|');
2523 aString.append(IOConstants.TAG_MAPVALUE).append(':').append(EntityEncoder.encode(s.getPersistentFormat()));
2524 aString.append(']');
2525 }
2526 }
2527
2528 /**
2529 * Convenience Method

Callers 1

chosenFeatsMethod · 0.95

Calls 4

getKeyForMethod · 0.95
encodeMethod · 0.95
getPersistentFormatMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected