| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.beans.ObjectModelBase
freemarker.ext.beans.ObjectModel
freemarker.ext.beans.EnumerationModel
freemarker.ext.beans2 package
public final class EnumerationModel
A class that adds TemplateListModel2 functionality to the
 Enumeration interface implementers.
Using the model as a list model is NOT thread-safe, as enumerations are inherently not thread-safe.
| Field Summary | 
|---|
| Fields inherited from class freemarker.ext.beans.ObjectModelBase | 
|---|
object | 
| Constructor Summary | |
|---|---|
EnumerationModel(java.util.Enumeration enumeration)
Deprecated. Creates a new model that wraps the specified enumeration object.  | 
|
| Method Summary | |
|---|---|
static EnumerationModel | 
getInstance(java.util.Enumeration object)
Deprecated. Returns a model wrapping the specified enumeration object.  | 
 freemarker.ext.beans.ObjectModelBase.ModelType | 
getType()
Deprecated. Returns the type of this object (which is TYPE_ENUMERATION).  | 
 boolean | 
isEmpty()
Deprecated. Returns true if the enumeration is null or the enumeration has no more elements, otherwise false.  | 
 void | 
releaseIterator(TemplateIteratorModel iterator)
Deprecated. Release the underlying enumerator, so that we don't try to walk over it again  | 
 TemplateIteratorModel | 
templateIterator()
Deprecated. Retrieve a TemplateIteratorModel for this enumeration. | 
| 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 EnumerationModel(java.util.Enumeration enumeration)
enumeration - the enumeration object to wrap into a model.| Method Detail | 
|---|
public boolean isEmpty()
isEmpty in interface TemplateModelisEmpty in class ObjectModelBasetrue if this object is empty, otherwise falsepublic static final EnumerationModel getInstance(java.util.Enumeration object)
public freemarker.ext.beans.ObjectModelBase.ModelType getType()
getType in class ObjectModel
public TemplateIteratorModel templateIterator()
                                       throws TemplateModelException
TemplateIteratorModel for this enumeration.
templateIterator in interface TemplateListModel2TemplateModelException - the enumeration has already been spentpublic void releaseIterator(TemplateIteratorModel iterator)
releaseIterator in interface TemplateListModel2iterator - the iterator that just walked over the enumeration
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||