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

Method toString

code/src/java/pcgen/core/kit/KitGear.java:88–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86 }
87
88 @Override
89 public String toString()
90 {
91 final StringBuilder info = new StringBuilder(100);
92
93 if (quantity != null)
94 {
95 String qtyStr = String.valueOf(quantity);
96 if (!"1".equals(qtyStr))
97 {
98 info.append(quantity).append('x');
99 }
100 }
101
102 info.append(equip == null ? "null" : equip.getLSTformat(false));
103
104 if (mods != null)
105 {
106 info.append(" (");
107 boolean needsSlash = false;
108 for (EqModRef modRef : mods)
109 {
110 if (needsSlash)
111 {
112 info.append('/');
113 }
114 needsSlash = true;
115 info.append(modRef.getRef().getLSTformat(false));
116 for (String s : modRef.getChoices())
117 {
118 info.append(Constants.PIPE).append(s);
119 }
120 }
121 info.append(')');
122 }
123
124 return info.toString();
125 }
126
127 private void processLookups(Kit aKit, PlayerCharacter aPC)
128 {

Callers

nothing calls this directly

Calls 7

equalsMethod · 0.65
getLSTformatMethod · 0.65
getChoicesMethod · 0.65
toStringMethod · 0.65
valueOfMethod · 0.45
appendMethod · 0.45
getRefMethod · 0.45

Tested by

no test coverage detected