|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.template.FastIterator
public class FastIterator
Iterator class for FastList
. Note that this model is not
serializable, to match the semantics of the underlying java.util.Iterator
.
FastList
Field Summary | |
---|---|
protected java.util.Iterator<? extends TemplateModel> |
iterator
The iterator being wrapped by this model. |
Constructor Summary | |
---|---|
FastIterator(java.util.Collection<? extends TemplateModel> collection)
Constructor that takes a java.util.Collection implementation
to iterator over. |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.util.Iterator<? extends TemplateModel> iterator
Constructor Detail |
---|
public FastIterator(java.util.Collection<? extends TemplateModel> collection)
java.util.Collection
implementation
to iterator over.
java.lang.NullPointerException
- the collection is nullMethod Detail |
---|
public boolean hasNext() throws TemplateModelException
hasNext
in interface TemplateIteratorModel
true
if there are more items to be iterated over,
otherwise false
TemplateModelException
- there was a problem determining the
next item in the listpublic TemplateModel next() throws TemplateModelException
TemplateModel
containing the underlying value.
next
in interface TemplateIteratorModel
TemplateModelException
- the next item couldn't be retrieved,
or we're at the end of the listpublic boolean isEmpty() throws TemplateModelException
isEmpty
in interface TemplateModel
true
if this object is empty, otherwise false
TemplateModelException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |