A class that adds
TemplateModelIterator functionality to the
Iterator interface implementers.
It differs from the
freemarker.template.SimpleCollection in that
it inherits from
BeanModel , and therefore you can call methods on
it directly, even to the effect of calling iterator.remove() in
the template. Using the model as a collection model is NOT
thread-safe, as iterators are inherently not thread-safe.
Further, you can iterate over it only once. Attempts to call the
IteratorModel.iterator() method after it was already driven to the end once will
throw an exception.
author: Attila Szegedi version: $Id: IteratorModel.java,v 1.26 2003/06/03 13:21:32 szegedia Exp $ |