Package io.github.erdos.stencil
Class TemplateData
java.lang.Object
io.github.erdos.stencil.TemplateData
Contains data to fill template documents. Immutable.
-
Method Summary
Modifier and TypeMethodDescriptionstatic TemplateData
empty()
Construct a new empty template data object.static TemplateData
Constructs a template data instance holding a map data structure.getData()
Returns contained data as a possibly nested map.
-
Method Details
-
empty
Construct a new empty template data object. -
fromMap
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:
IllegalArgumentException
- when input is null
-
getData
Returns contained data as a possibly nested map.- Returns:
- template data map. Not null.
-