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

Method get

code/src/java/pcgen/output/model/UnitSetModel.java:54–75  ·  view source on GitHub ↗
(String key)

Source from the content-addressed store, hash-verified

52 }
53
54 @Override
55 public TemplateModel get(String key) throws TemplateModelException
56 {
57 String unit;
58 if ("height".equals(key))
59 {
60 unit = unitSet.getHeightUnit();
61 }
62 else if ("distance".equals(key))
63 {
64 unit = unitSet.getDistanceUnit();
65 }
66 else if ("weight".equals(key))
67 {
68 unit = unitSet.getWeightUnit();
69 }
70 else
71 {
72 throw new TemplateModelException("UnitSet did not have output of type " + key);
73 }
74 return SimpleWrapperLibrary.wrap(unit);
75 }
76
77 @Override
78 public boolean isEmpty()

Callers

nothing calls this directly

Calls 5

wrapMethod · 0.95
getDistanceUnitMethod · 0.80
equalsMethod · 0.65
getHeightUnitMethod · 0.45
getWeightUnitMethod · 0.45

Tested by

no test coverage detected