public class TemplateModelListSequence extends java.lang.Object implements TemplateSequenceModel
java.util.List
of already wrapped objects
directly, with minimal resource usage. Warning! It does not copy the original
list.NOTHING
Constructor and Description |
---|
TemplateModelListSequence(java.util.List list) |
Modifier and Type | Method and Description |
---|---|
TemplateModel |
get(int index)
Retrieves the i-th template model in this sequence.
|
java.lang.Object |
getWrappedObject() |
int |
size() |
public TemplateModel get(int index)
TemplateSequenceModel
get
in interface TemplateSequenceModel
null
if
the index is out of bounds. Note that a null
value is
interpreted by FreeMarker as "variable does not exist", and accessing
a missing variables is usually considered as an error in the FreeMarker
Template Language, so the usage of a bad index will not remain hidden.public int size()
size
in interface TemplateSequenceModel
public java.lang.Object getWrappedObject()