Package io.github.erdos.stencil
Class TemplateData
- java.lang.Object
-
- io.github.erdos.stencil.TemplateData
-
public final class TemplateData extends java.lang.Object
Contains data to fill template documents. Immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TemplateData
empty()
Construct a new empty template data object.static TemplateData
fromMap(java.util.Map<java.lang.String,java.lang.Object> data)
Constructs a template data instance holding a map data structure.java.util.Map<java.lang.String,java.lang.Object>
getData()
Returns contained data as a possibly nested map.
-
-
-
Method Detail
-
empty
public static TemplateData empty()
Construct a new empty template data object.
-
fromMap
public static TemplateData fromMap(java.util.Map<java.lang.String,java.lang.Object> data)
Constructs a template data instance holding a map data structure.- Parameters:
data
- map of template data. Possibly nested: values might contain maps or vectors recursively.- Returns:
- constructed data holder. Never null.
- Throws:
java.lang.IllegalArgumentException
- when input is null
-
getData
public java.util.Map<java.lang.String,java.lang.Object> getData()
Returns contained data as a possibly nested map.- Returns:
- template data map. Not null.
-
-