Class SimpleSequence

All Implemented Interfaces:
TemplateModel, TemplateSequenceModel, Serializable
Direct Known Subclasses:
SimpleList

public class SimpleSequence extends WrappingTemplateModel implements TemplateSequenceModel, Serializable

A convenient implementation of a list. This object implements TemplateSequenceModel, using an underlying java.util.List implementation.

A SimpleSequence can act as a cache for a TemplateCollectionModel, e.g. one that gets data from a database. When passed a TemplateCollectionModel as an argument to its constructor, the SimpleSequence immediately copies all the elements and discards the TemplateCollectionModel.

This class is thread-safe if you don't call the add method after you have made the object available for multiple threads.

Note:
As of 2.0, this class is unsynchronized by default. To obtain a synchronized wrapper, call the synchronizedWrapper() method.

See Also: