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>

public static class IModelLoader.LoadResult<M extends IModel> extends Object
Represents the result of loading a model.
Author:
Holger Eichelberger
  • Field Details

  • Constructor Details

    • LoadResult

      public LoadResult(List<M> models, List<IMessage> messages)
      Creates a result instance.
      Parameters:
      models - the loaded models
      messages - 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

      public M getModel(int index)
      Returns the specified model.
      Parameters:
      index - the index of the model to return
      Returns:
      the specified model
      Throws:
      IndexOutOfBoundsException - if index<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

      public IMessage getMessage(int index)
      Returns the specific message.
      Parameters:
      index - the index of the message
      Returns:
      the message
      Throws:
      IndexOutOfBoundsException - if index<0 || index>=getMessageCount()