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

Method unparse

code/src/java/plugin/lsttokens/equipment/WtToken.java:65–79  ·  view source on GitHub ↗
(LoadContext context, Equipment eq)

Source from the content-addressed store, hash-verified

63 }
64
65 @Override
66 public String[] unparse(LoadContext context, Equipment eq)
67 {
68 BigDecimal weight = context.getObjectContext().getObject(eq, ObjectKey.WEIGHT);
69 if (weight == null)
70 {
71 return null;
72 }
73 if (weight.compareTo(BigDecimal.ZERO) < 0)
74 {
75 context.addWriteMessage(getTokenName() + " was expecting a decimal value >= 0 : " + weight);
76 return null;
77 }
78 return new String[]{weight.toString()};
79 }
80
81 @Override
82 public Class<Equipment> getTokenClass()

Callers

nothing calls this directly

Calls 6

getTokenNameMethod · 0.95
getObjectMethod · 0.65
getObjectContextMethod · 0.65
addWriteMessageMethod · 0.65
toStringMethod · 0.65
compareToMethod · 0.45

Tested by

no test coverage detected