freemarker.testcase.models

Class BooleanList1

Implemented Interfaces:
TemplateModel, TemplateSequenceModel

public class BooleanList1
extends java.lang.Object
implements TemplateSequenceModel

Model for testing the impact of isEmpty() on template list models. Every other method simply delegates to a SimpleList model.
Version:
$Id: BooleanList1.java,v 1.16 2004/01/06 17:06:44 szegedia Exp $
Author:
Nicholas Cull

Fields inherited from interface freemarker.template.TemplateModel

NOTHING

Constructor Summary

BooleanList1()
Creates new BooleanList1

Method Summary

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

Constructor Details

BooleanList1

public BooleanList1()
Creates new BooleanList1

Method Details

get

public TemplateModel get(int i)
            throws TemplateModelException
Specified by:
get in interface TemplateSequenceModel
Returns:
the specified index in the list

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.

size

public int size()
Specified by:
size in interface TemplateSequenceModel