An automatically created aggregate of properties. I often have lists of things that need to be formatted, but the list items are actually pieces of data that are not already in an object. I need ST to do something like: Ter=3432 Tom=32234 .... using template:</p
| 73 | |
| 74 | |
| 75 | public class Aggregate { |
| 76 | public HashMap<String, Object> properties = new HashMap<String, Object>(); |
| 77 | /** Allow StringTemplate to add values, but prevent the end |
| 78 | * user from doing so. |
| 79 | */ |
| 80 | protected void put(String propName, Object propValue) { |
| 81 | properties.put(propName, propValue); |
| 82 | } |
| 83 | |
| 84 | |
| 85 | public Object get(String propName) { |
| 86 | return properties.get(propName); |
| 87 | } |
| 88 | |
| 89 | @Override |
| 90 | public String toString() { |
| 91 | return properties.toString(); |
| 92 | } |
| 93 | } |
nothing calls this directly
no outgoing calls
no test coverage detected