|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.ext.beans.ObjectModelBase freemarker.ext.beans.ObjectModel freemarker.ext.beans.IteratorModel
freemarker.ext.beans2
package
public final class IteratorModel
A class that adds TemplateListModel2
functionality to the
Iterator
interface implementers.
Using the model as a list model is NOT thread-safe, as iterators are inherently not thread-safe.
Field Summary |
---|
Fields inherited from class freemarker.ext.beans.ObjectModelBase |
---|
object |
Constructor Summary | |
---|---|
IteratorModel(java.util.Iterator iterator)
Deprecated. Creates a new model that wraps the specified iterator object. |
Method Summary | |
---|---|
static IteratorModel |
getInstance(java.util.Iterator object)
Deprecated. Returns a model wrapping the specified iterator object. |
freemarker.ext.beans.ObjectModelBase.ModelType |
getType()
Deprecated. Returns the type of this object (which is TYPE_ITERATOR) |
boolean |
isEmpty()
Deprecated. Returns true if the iterator is null or the iterator has no elements remaining, otherwise false. |
void |
releaseIterator(TemplateIteratorModel iterator)
Deprecated. Release the underlying iterator. |
TemplateIteratorModel |
templateIterator()
Deprecated. Retrive an iterator for this object. |
Methods inherited from class freemarker.ext.beans.ObjectModel |
---|
get, getInstance |
Methods inherited from class freemarker.ext.beans.ObjectModelBase |
---|
getAsObject, getAsString, getInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IteratorModel(java.util.Iterator iterator)
iterator
- the iterator object to wrap into a model.Method Detail |
---|
public static final IteratorModel getInstance(java.util.Iterator object)
public freemarker.ext.beans.ObjectModelBase.ModelType getType()
getType
in class ObjectModel
public boolean isEmpty()
isEmpty
in interface TemplateModel
isEmpty
in class ObjectModelBase
true
if this object is empty, otherwise false
public TemplateIteratorModel templateIterator() throws TemplateModelException
templateIterator
in interface TemplateListModel2
TemplateIteratorModel
wrapping the underlying
java.util.Iterator
implementation
TemplateModelException
- the next item in the list can't be
retrieved, or no next item exists.public void releaseIterator(TemplateIteratorModel iterator)
releaseIterator
in interface TemplateListModel2
iterator
- the wrapper for the iterator to be released
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |