Class Model
- All Implemented Interfaces:
IModel
- Since:
- 3.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IEngineConfigurationprivate static final int(package private) IEngineTemplateEvent[](package private) intprivate TemplateMode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IModelVisitor visitor) Accept a visitor implementingIModelVisitor.voidadd(ITemplateEvent event) Adds an event at the end of the sequence.voidAdd an entire model at the end of the sequence.(package private) static IEngineTemplateEventasEngineEvent(ITemplateEvent event) Clones the model and all its events.private voiddoInsertModel(int pos, Model model) private voiddoInsertOtherModel(int pos, IModel model) private voiddoInsertTemplateModel(int pos, TemplateModel model) get(int pos) Retrieves a specific event from the model sequence.final IEngineConfigurationReturns the engine configuration that was used for creating this model.final TemplateModeReturns the template mode used for creating this model.voidinsert(int pos, ITemplateEvent event) Inserts an event into a specific position in the sequence.voidinsertModel(int pos, IModel model) Inserts an entire model into a specific position in this model's sequence.(package private) voidprocess(ITemplateHandler handler) (package private) intprocess(ITemplateHandler handler, int offset, TemplateFlowController controller) voidremove(int pos) Remove an event from the sequence.voidreplace(int pos, ITemplateEvent event) Replaces the event at the specified position with the one passed as argument.voidreset()Remove all events from the model sequence.(package private) voidresetAsCloneOf(Model model) (package private) booleanintsize()The size of the model (number ofITemplateEventobjects contained).final StringtoString()final voidWrite this model (its events) through the specified writer.
-
Field Details
-
INITIAL_EVENT_QUEUE_SIZE
private static final int INITIAL_EVENT_QUEUE_SIZE- See Also:
-
configuration
-
templateMode
-
queue
IEngineTemplateEvent[] queue -
queueSize
int queueSize
-
-
Constructor Details
-
Model
Model(IEngineConfiguration configuration, TemplateMode templateMode) -
Model
Model(IModel model)
-
-
Method Details
-
getConfiguration
Description copied from interface:IModelReturns the engine configuration that was used for creating this model.
- Specified by:
getConfigurationin interfaceIModel- Returns:
- the engine configuration.
-
getTemplateMode
Description copied from interface:IModelReturns the template mode used for creating this model.
- Specified by:
getTemplateModein interfaceIModel- Returns:
- the template mode.
-
size
public int size()Description copied from interface:IModelThe size of the model (number of
ITemplateEventobjects contained). -
get
Description copied from interface:IModelRetrieves a specific event from the model sequence.
-
add
Description copied from interface:IModelAdds an event at the end of the sequence.
-
insert
Description copied from interface:IModelInserts an event into a specific position in the sequence.
-
replace
Description copied from interface:IModelReplaces the event at the specified position with the one passed as argument.
-
addModel
Description copied from interface:IModelAdd an entire model at the end of the sequence. This effectively appends the
modelargument's sequence to this one. -
insertModel
Description copied from interface:IModelInserts an entire model into a specific position in this model's sequence.
- Specified by:
insertModelin interfaceIModel- Parameters:
pos- the position to insert the mdoel (zero-based).model- the model to be inserted.
-
doInsertModel
-
doInsertTemplateModel
-
doInsertOtherModel
-
remove
public void remove(int pos) Description copied from interface:IModelRemove an event from the sequence.
-
reset
public void reset()Description copied from interface:IModelRemove all events from the model sequence.
-
process
-
process
-
cloneModel
Description copied from interface:IModelClones the model and all its events.
- Specified by:
cloneModelin interfaceIModel- Returns:
- the new model.
-
resetAsCloneOf
-
write
Description copied from interface:IModelWrite this model (its events) through the specified writer.
- Specified by:
writein interfaceIModel- Parameters:
writer- the writer that will be used for writing the model.- Throws:
IOException- should any exception happen.
-
accept
Description copied from interface:IModelAccept a visitor implementing
IModelVisitor. This visitor will be executed for each event in the sequence. -
sameAs
-
toString
-
asEngineEvent
-