freemarker.core
Class CollectionAndSequence
java.lang.Object
freemarker.core.CollectionAndSequence
- Serializable, TemplateCollectionModel, TemplateModel, TemplateSequenceModel
public final class CollectionAndSequence
extends java.lang.Object
Add sequence capabilities to an existing collection, or
vice versa. Used by ?keys and ?values built-ins.
get
public TemplateModel get(int i)
throws TemplateModelException
Retrieves the i-th template model in this sequence.
- get in interface TemplateSequenceModel
- the item at the specified index, or
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.