public class JythonSequenceModel extends JythonModel implements TemplateSequenceModel, TemplateCollectionModel
PySequence descendants).object, wrapperNOTHINGFALSE, TRUEEMPTY_STRING| Constructor and Description |
|---|
JythonSequenceModel(org.python.core.PyObject object,
JythonWrapper wrapper) |
| Modifier and Type | Method and Description |
|---|---|
TemplateModel |
get(int index)
Returns
PyObject.__finditem__(int). |
TemplateModelIterator |
iterator()
Retrieves a template model iterator that is used to iterate over
the elements in this collection.
|
int |
size()
Returns
PyObject.__len__(). |
exec, get, getAdaptedObject, getAsBoolean, getAsString, getWrappedObject, isEmptypublic JythonSequenceModel(org.python.core.PyObject object,
JythonWrapper wrapper)
public TemplateModel get(int index) throws TemplateModelException
PyObject.__finditem__(int).get 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.TemplateModelExceptionpublic int size()
throws TemplateModelException
PyObject.__len__().size in interface TemplateSequenceModelTemplateModelExceptionpublic TemplateModelIterator iterator()
TemplateCollectionModeliterator in interface TemplateCollectionModel