freemarker.testcase.models
Class ListModel1

java.lang.Object
  |
  +--freemarker.testcase.models.ListModel1
All Implemented Interfaces:
TemplateListModel2, TemplateModel

public final class ListModel1
extends java.lang.Object
implements TemplateListModel2

A simple list model for testing the list iterator functionality.

Version:
$Id: ListModel1.java,v 1.3 2003/11/28 01:17:07 run2000 Exp $
Author:
Nicholas Cull

Constructor Summary
ListModel1()
          Default constructor that creates a simple list.
 
Method Summary
 boolean isEmpty()
          Is the model empty?
 void releaseIterator(TemplateIteratorModel iterator)
          Return the iterator to the object pool.
 TemplateIteratorModel templateIterator()
          Retrieve an iterator to walk through the items in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListModel1

public ListModel1()
Default constructor that creates a simple list.
Method Detail

isEmpty

public boolean isEmpty()
Is the model empty?
Specified by:
isEmpty in interface TemplateModel
Returns:
true if the list is empty, otherwise false

templateIterator

public TemplateIteratorModel templateIterator()
Retrieve an iterator to walk through the items in the list.
Specified by:
templateIterator in interface TemplateListModel2
Returns:
a new template iterator to walk through the items with

releaseIterator

public void releaseIterator(TemplateIteratorModel iterator)
Return the iterator to the object pool.
Specified by:
releaseIterator in interface TemplateListModel2
Parameters:
iterator - the iterator to be returned