freemarker.testcase.models

Class LegacyList

Implemented Interfaces:
Serializable, TemplateModel, TemplateSequenceModel

public class LegacyList
extends SimpleSequence

A little bridge class that subclasses the new SimpleList and still implements the deprecated TemplateListModel

Field Summary

Fields inherited from class freemarker.template.SimpleSequence

list

Fields inherited from interface freemarker.template.TemplateModel

NOTHING

Method Summary

boolean
hasNext()
boolean
isRewound()
TemplateModel
next()
void
rewind()
Resets the cursor to the beginning of the list.

Methods inherited from class freemarker.template.SimpleSequence

add, add, get, size, synchronizedWrapper, toList, toString

Methods inherited from class freemarker.template.WrappingTemplateModel

getDefaultObjectWrapper, getObjectWrapper, setDefaultObjectWrapper, setObjectWrapper, wrap

Method Details

hasNext

public boolean hasNext()
Returns:
true if there is a next element.

isRewound

public boolean isRewound()
Returns:
true if the cursor is at the beginning of the list.

next

public TemplateModel next()
            throws TemplateModelException
Returns:
the next element in the list.

rewind

public void rewind()
Resets the cursor to the beginning of the list.