com.revusky.niggle.templates.freemarkerimpl
Class LazyList
java.lang.Object
|
+--com.revusky.niggle.templates.PresentationWrapper
|
+--com.revusky.niggle.templates.freemarkerimpl.FreemarkerPresentationWrapper
|
+--com.revusky.niggle.templates.freemarkerimpl.LazyList
- All Implemented Interfaces:
- freemarker.template.TemplateHashModel, freemarker.template.TemplateListModel, freemarker.template.TemplateModel
- public class LazyList
- extends FreemarkerPresentationWrapper
- implements freemarker.template.TemplateListModel, freemarker.template.TemplateHashModel
A "lazy" list implementation of the freemarker
TemplateListModel interface
for exposing a collection of records at one go.
- Author:
- Jonathan Revusky
Method Summary |
freemarker.template.TemplateModel |
get(int i)
|
freemarker.template.TemplateModel |
get(java.lang.String s)
|
boolean |
hasNext()
|
boolean |
isEmpty()
|
boolean |
isRewound()
|
freemarker.template.TemplateModel |
listSize()
|
freemarker.template.TemplateModel |
next()
|
void |
rewind()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LazyList
public LazyList(java.util.List list,
ServletInteraction interaction,
java.lang.String contentType)
- Parameters:
list,
- a List of the records. A null will be
massaged into an empty list.
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface freemarker.template.TemplateModel
rewind
public void rewind()
- Specified by:
rewind
in interface freemarker.template.TemplateListModel
isRewound
public boolean isRewound()
- Specified by:
isRewound
in interface freemarker.template.TemplateListModel
next
public freemarker.template.TemplateModel next()
throws freemarker.template.TemplateModelException
- Specified by:
next
in interface freemarker.template.TemplateListModel
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface freemarker.template.TemplateListModel
listSize
public freemarker.template.TemplateModel listSize()
throws freemarker.template.TemplateModelException
- Specified by:
listSize
in interface freemarker.template.TemplateListModel
get
public freemarker.template.TemplateModel get(int i)
throws freemarker.template.TemplateModelException
- Specified by:
get
in interface freemarker.template.TemplateListModel
get
public freemarker.template.TemplateModel get(java.lang.String s)
throws freemarker.template.TemplateModelException
- Specified by:
get
in interface freemarker.template.TemplateHashModel