|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.beans2.BeanWrapper<T>
freemarker.ext.beans2.IteratorWrapper<T>
public class IteratorWrapper<T extends java.util.Iterator>
Wraps an Iterator object as an Iterator model. Provides support for any additional methods provided by the iterator. Also a base class for ListIteratorWrapper.
| Field Summary |
|---|
| Fields inherited from class freemarker.ext.beans2.BeanWrapper |
|---|
emptyParams, object |
| Constructor Summary | |
|---|---|
IteratorWrapper()
Default constructor where an object is not provided initially. |
|
IteratorWrapper(T iterator)
Constructor that takes an Iterator object to be wrapped. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Do we have another item in the list? |
boolean |
isEmpty()
Is the object empty? |
TemplateModel |
next()
Retrieve the next item in the list. |
| Methods inherited from class freemarker.ext.beans2.BeanWrapper |
|---|
clone, get, getAsObject, getAsString, put, setObject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IteratorWrapper()
public IteratorWrapper(T iterator)
iterator - the iterator object to be wrapped| Method Detail |
|---|
public boolean isEmpty()
throws TemplateModelException
isEmpty in interface TemplateModelisEmpty in class BeanWrapper<T extends java.util.Iterator>true if this object is empty, otherwise false
TemplateModelException
public boolean hasNext()
throws TemplateModelException
hasNext in interface TemplateIteratorModeltrue if there are more items to be iterated over,
otherwise false
TemplateModelException - there was a problem determining the
next item in the list
public TemplateModel next()
throws TemplateModelException
TemplateModel
containing the underlying value.
next in interface TemplateIteratorModelTemplateModelException - the next item couldn't be retrieved,
or we're at the end of the list
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||