Modifier and Type | Method and Description |
---|---|
void |
accept(IModelVisitor visitor)
Accept a visitor implementing
IModelVisitor . |
void |
add(ITemplateEvent event)
Adds an event at the end of the sequence.
|
void |
addModel(IModel model)
Add an entire model at the end of the sequence.
|
IModel |
cloneModel()
Clones the model and all its events.
|
ITemplateEvent |
get(int pos)
Retrieves a specific event from the model sequence.
|
IEngineConfiguration |
getConfiguration()
Returns the engine configuration that was used for creating this model.
|
TemplateData |
getTemplateData() |
TemplateMode |
getTemplateMode()
Returns the template mode used for creating this model.
|
void |
insert(int pos,
ITemplateEvent event)
Inserts an event into a specific position in the sequence.
|
void |
insertModel(int pos,
IModel model)
Inserts an entire model into a specific position in this model's sequence.
|
void |
remove(int pos)
Remove an event from the sequence.
|
void |
replace(int pos,
ITemplateEvent event)
Replaces the event at the specified position with the one passed
as argument.
|
void |
reset()
Remove all events from the model sequence.
|
int |
size()
The size of the model (number of
ITemplateEvent objects contained). |
String |
toString() |
void |
write(Writer writer)
Write this model (its events) through the specified writer.
|
public final TemplateData getTemplateData()
public final IEngineConfiguration getConfiguration()
IModel
Returns the engine configuration that was used for creating this model.
getConfiguration
in interface IModel
public final TemplateMode getTemplateMode()
IModel
Returns the template mode used for creating this model.
getTemplateMode
in interface IModel
public final int size()
IModel
The size of the model (number of ITemplateEvent
objects contained).
public final ITemplateEvent get(int pos)
IModel
Retrieves a specific event from the model sequence.
public final void add(ITemplateEvent event)
IModel
Adds an event at the end of the sequence.
public final void insert(int pos, ITemplateEvent event)
IModel
Inserts an event into a specific position in the sequence.
public final void replace(int pos, ITemplateEvent event)
IModel
Replaces the event at the specified position with the one passed as argument.
public final void addModel(IModel model)
IModel
Add an entire model at the end of the sequence. This effectively appends the model argument's sequence to this one.
public final void insertModel(int pos, IModel model)
IModel
Inserts an entire model into a specific position in this model's sequence.
insertModel
in interface IModel
pos
- the position to insert the mdoel (zero-based).model
- the model to be inserted.public final void remove(int pos)
IModel
Remove an event from the sequence.
public final void reset()
IModel
Remove all events from the model sequence.
public final IModel cloneModel()
IModel
Clones the model and all its events.
cloneModel
in interface IModel
public final void write(Writer writer) throws IOException
IModel
Write this model (its events) through the specified writer.
write
in interface IModel
writer
- the writer that will be used for writing the model.IOException
- should any exception happen.public void accept(IModelVisitor visitor)
IModel
Accept a visitor implementing IModelVisitor
. This visitor will be executed
for each event in the sequence.
Copyright © 2017 The THYMELEAF team. All rights reserved.