|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.ext.beans2.BeanWrapper<T> freemarker.ext.beans2.EnumerationWrapper<T>
public class EnumerationWrapper<T extends java.util.Enumeration>
Wraps an Enumeration object as an Iterator model. Also provides support for any additional methods provided by the enumeration.
Field Summary |
---|
Fields inherited from class freemarker.ext.beans2.BeanWrapper |
---|
emptyParams, object |
Constructor Summary | |
---|---|
EnumerationWrapper()
Default constructor where an object is not provided initially. |
|
EnumerationWrapper(T enumeration)
Constructor that takes an Enumeration 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 EnumerationWrapper()
public EnumerationWrapper(T enumeration)
enumeration
- the enumeration object to be wrappedMethod Detail |
---|
public boolean isEmpty() throws TemplateModelException
isEmpty
in interface TemplateModel
isEmpty
in class BeanWrapper<T extends java.util.Enumeration>
true
if this object is empty, otherwise false
TemplateModelException
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 list
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |