public class TemplateModelListSequence extends Object implements TemplateSequenceModel
List of TemplateModel-s. It does not copy the original
list. It's mostly useful when implementing TemplateMethodModelEx-es that collect items from other
TemplateModel-s.NOTHING| Constructor and Description |
|---|
TemplateModelListSequence(List list) |
| Modifier and Type | Method and Description |
|---|---|
TemplateModel |
get(int index)
Retrieves the i-th template model in this sequence.
|
Object |
getWrappedObject()
Returns the original
List of TemplateModel-s, so it's not a fully unwrapped value. |
int |
size() |
public TemplateModelListSequence(List list)
public TemplateModel get(int index)
TemplateSequenceModelget in interface TemplateSequenceModelnull 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 TemplateSequenceModelpublic Object getWrappedObject()
List of TemplateModel-s, so it's not a fully unwrapped value.