public void set(String key, Object value) { modelMap.add(key, value); } }
@Override public Object calculate(JtwigContext context) { return context.map(this.identifier); } }
public JtwigModelMap add (String key, Object object) { put(key, object); return this; }
public JtwigContext() { this.functionRepository = new DefaultFunctionRepository(); this.modelMap = new JtwigModelMap(); }
public String output (JtwigContext context) throws ParseException, CompileException, RenderException { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); output(outputStream, context); return outputStream.toString(); }
public JtwigModelMap add(Map<String, Object> model) { putAll(model); return this; }
public static JtwigContext context () { return new JtwigContext(); }
public boolean has (String key) { return containsKey(key); }
public Object map(String key) { if (MODEL.equals(key)) return modelMap; else return modelMap.get(key); }
public JtwigContext() { this.functionRepository = new DefaultFunctionRepository(); this.modelMap = new JtwigModelMap(); }
public JtwigContext withModelAttribute(String key, Object value) { this.modelMap.add(key, value); return this; }
public String output (JtwigContext context) throws ParseException, CompileException, RenderException { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); output(outputStream, context); return outputStream.toString(); }
@Override public Object calculate(JtwigContext context) { return context.map(this.identifier); } }
public JtwigModelMap add (String key, Object object) { put(key, object); return this; }
public JtwigModelMap add(Map<String, Object> model) { putAll(model); return this; }
public static JtwigContext context () { return new JtwigContext(); }
public boolean has (String key) { return containsKey(key); }
public Object map(String key) { if (MODEL.equals(key)) return modelMap; else return modelMap.get(key); }
public JtwigContext withModelAttribute(String key, Object value) { this.modelMap.add(key, value); return this; }
public void set(String key, Object value) { modelMap.add(key, value); } }