freemarker.ext.misc
Class ExtendedIterator

java.lang.Object
  |
  +--freemarker.template.FastIterator
        |
        +--freemarker.ext.misc.ExtendedIterator
All Implemented Interfaces:
TemplateHashModel, TemplateIteratorModel, TemplateModel

public class ExtendedIterator
extends FastIterator
implements TemplateHashModel

Iterator for the ExtendedList class. The most notable addition for this iterator is that ability to determine whether we're at the end of the list. This is done by implementing the TemplateHashModel interface as well as the standard TemplateIteratorModel interface.

Since:
1.8
Version:
$Id: ExtendedIterator.java,v 1.3 2003/11/17 13:06:24 run2000 Exp $
Author:
Nicholas Cull

Fields inherited from class freemarker.template.FastIterator
iterator
 
Constructor Summary
ExtendedIterator(java.util.List list)
           
 
Method Summary
 TemplateModel get(java.lang.String key)
          Gets a TemplateModel from the hash.
 
Methods inherited from class freemarker.template.FastIterator
hasNext, isEmpty, next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface freemarker.template.TemplateModel
isEmpty
 

Constructor Detail

ExtendedIterator

public ExtendedIterator(java.util.List list)
Method Detail

get

public TemplateModel get(java.lang.String key)
                  throws TemplateModelException
Gets a TemplateModel from the hash.
Specified by:
get in interface TemplateHashModel
Parameters:
key - the name by which the TemplateModel is identified in the template.
Returns:
the TemplateModel referred to by the key, or null if not found.