freemarker.template
Interface TemplateIteratorModel
- All Superinterfaces:
- TemplateModel
- All Known Implementing Classes:
- FastIterator, NodeListIterator, FastIndexedIterator
- public interface TemplateIteratorModel
- extends TemplateModel
Iterators the iterate over a TemplateListModel2
must implement
this interface. The iterface is almost identical to the
java.util.Iterator
interface, so that such iterators can be
transparently wrapped in a TemplateIteratorModel
implementation.
- Since:
- 1.8
- Version:
- $Id: TemplateIteratorModel.java,v 1.3 2003/11/03 03:33:32 run2000 Exp $
- See Also:
TemplateListModel2
Method Summary |
boolean |
hasNext()
Do we have another item in the list? |
TemplateModel |
next()
Retrieve the next item in the list. |
hasNext
public boolean hasNext()
throws TemplateModelException
- Do we have another item in the list?
- Returns:
true
if there are more items to be iterated over,
otherwise false
- Throws:
TemplateModelException
- there was a problem determining the
next item in the list
next
public TemplateModel next()
throws TemplateModelException
- Retrieve the next item in the list. The item will be a
TemplateModel
containing the underlying value.
- Returns:
- the next item in the list
- Throws:
TemplateModelException
- the next item couldn't be retrieved,
or we're at the end of the list