(String key)
| 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() |
nothing calls this directly
no test coverage detected