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

Method printAspect

code/src/java/pcgen/cdom/helper/Aspect.java:363–382  ·  view source on GitHub ↗
(PlayerCharacter pc, AspectName key, List<CNAbility> abilities, boolean printName)

Source from the content-addressed store, hash-verified

361 }
362
363 public static String printAspect(PlayerCharacter pc, AspectName key, List<CNAbility> abilities, boolean printName)
364 {
365 if (abilities.isEmpty())
366 {
367 return "";
368 }
369 Ability sampleAbilityObject = abilities.get(0).getAbility();
370 StringBuilder buff = new StringBuilder(50);
371 List<Aspect> aspects = sampleAbilityObject.get(MapKey.ASPECT, key);
372 Aspect aspect = lastPassingAspect(aspects, pc, sampleAbilityObject);
373 if (aspect != null)
374 {
375 if (printName)
376 {
377 buff.append(aspect.getName()).append(": ");
378 }
379 buff.append(aspect.getAspectText(pc, abilities));
380 }
381 return buff.toString();
382 }
383
384 public static String printAspect(PlayerCharacter pc, AspectName key, List<CNAbility> abilities)
385 {

Callers 3

getHTMLInfoMethod · 0.95
printAspectValueMethod · 0.95
getAspectStringMethod · 0.95

Calls 8

lastPassingAspectMethod · 0.95
getNameMethod · 0.95
getAspectTextMethod · 0.95
isEmptyMethod · 0.65
getMethod · 0.65
toStringMethod · 0.65
getAbilityMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected