|
|||||||||
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.CollectionWrapper<T>
public class CollectionWrapper<T extends java.util.Collection>
Field Summary |
---|
Fields inherited from class freemarker.ext.beans2.BeanWrapper |
---|
emptyParams, object |
Constructor Summary | |
---|---|
CollectionWrapper()
|
|
CollectionWrapper(T object)
|
Method Summary | |
---|---|
TemplateModel |
exec(java.util.List<TemplateModel> arguments)
Tests or sets an object in a Collection. |
void |
releaseIterator(TemplateIteratorModel iterator)
Returns the used iterator to the list model. |
TemplateIteratorModel |
templateIterator()
Retrieves an iterator to iterate over this collection. |
Methods inherited from class freemarker.ext.beans2.BeanWrapper |
---|
clone, get, getAsObject, getAsString, isEmpty, put, setObject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface freemarker.template.TemplateModel |
---|
isEmpty |
Methods inherited from interface freemarker.template.TemplateModel |
---|
isEmpty |
Constructor Detail |
---|
public CollectionWrapper()
public CollectionWrapper(T object)
Method Detail |
---|
public TemplateIteratorModel templateIterator() throws TemplateModelException
templateIterator
in interface TemplateListModel2
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 iterator to be returnedpublic TemplateModel exec(java.util.List<TemplateModel> arguments) throws TemplateModelException
Otherwise, if the second argument is either empty or the boolean value "false", then the object is removed from the collection.
Finally, if the second argument is any other value, then add the object to the collection.
exec
in interface TemplateMethodModel2
arguments
- a List
of TemplateModel
objects
containing the values of the arguments passed to the method.
TemplateModel
produced by the method, or null
.
TemplateModelException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |