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

Method toString

code/src/java/pcgen/core/kit/KitSkill.java:91–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89 }
90
91 @Override
92 public String toString()
93 {
94 final StringBuilder info = new StringBuilder(100);
95 if (skillList.size() > 1)
96 {
97 // This is a choice of skills.
98 info.append(getSafeCount()).append(" of (");
99 info.append(ReferenceUtilities.joinLstFormat(skillList, ", "));
100 info.append(")");
101 }
102 else
103 {
104 info.append(skillList.get(0).getLSTformat(false));
105 }
106 info.append(" (").append(rank);
107
108 if (info.toString().endsWith(".0"))
109 {
110 info.setLength(info.length() - 2);
111 }
112
113 if (isFree())
114 {
115 info.append("/free");
116 }
117
118 if (!selection.isEmpty())
119 {
120 info.append("/");
121 info.append(StringUtil.join(selection, ", "));
122 }
123
124 info.append(')');
125
126 return info.toString();
127 }
128
129 @Override
130 public boolean testApply(Kit aKit, PlayerCharacter aPC, List<String> warnings)

Callers

nothing calls this directly

Calls 10

getSafeCountMethod · 0.95
joinLstFormatMethod · 0.95
isFreeMethod · 0.95
joinMethod · 0.95
sizeMethod · 0.65
getLSTformatMethod · 0.65
getMethod · 0.65
toStringMethod · 0.65
isEmptyMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected