Class IModelLoader.LoadResult<M extends IModel>
java.lang.Object
net.ssehub.easy.basics.modelManagement.IModelLoader.LoadResult<M>
- Type Parameters:
M- the specific type of the model
- Enclosing interface:
IModelLoader<M extends IModel>
Represents the result of loading a model.
- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLoadResult(List<M> models, List<IMessage> messages) Creates a result instance. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of errors in the stored messages.getMessage(int index) Returns the specific message.intReturns the number of messages occurred during loading.getModel(int index) Returns the specified model.intReturns the number of loaded models.
-
Field Details
-
models
-
messages
-
-
Constructor Details
-
LoadResult
Creates a result instance.- Parameters:
models- the loaded modelsmessages- the messages which occurred (may be null)
-
-
Method Details
-
getModelCount
public int getModelCount()Returns the number of loaded models.- Returns:
- the number of loaded models
-
getModel
Returns the specified model.- Parameters:
index- the index of the model to return- Returns:
- the specified model
- Throws:
IndexOutOfBoundsException- ifindex<0 || index>=getModelCount()
-
getErrorCount
public int getErrorCount()Returns the number of errors in the stored messages.- Returns:
- the number of errors
-
getMessageCount
public int getMessageCount()Returns the number of messages occurred during loading.- Returns:
- the number of messages messages
-
getMessage
Returns the specific message.- Parameters:
index- the index of the message- Returns:
- the message
- Throws:
IndexOutOfBoundsException- ifindex<0 || index>=getMessageCount()
-