Class EnumerationModel

All Implemented Interfaces:
WrapperTemplateModel, AdapterTemplateModel, TemplateCollectionModel, TemplateHashModel, TemplateHashModelEx, TemplateModel, TemplateModelIterator, TemplateModelWithAPISupport

public class EnumerationModel extends BeanModel implements TemplateModelIterator, TemplateCollectionModel

A class that adds TemplateModelIterator functionality to the Enumeration interface implementers.

Using the model as a collection model is NOT thread-safe, as enumerations are inherently not thread-safe. Further, you can iterate over it only once. Attempts to call the iterator() method after it was already driven to the end once will throw an exception.