Class IModelLoader.LoadResult<M extends IModel>

  • Type Parameters:
    M - the specific type of the model
    Enclosing interface:
    IModelLoader<M extends IModel>

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

      Fields 
      Modifier and Type Field Description
      private java.util.List<IMessage> messages  
      private java.util.List<M> models  
    • Constructor Summary

      Constructors 
      Constructor Description
      LoadResult​(java.util.List<M> models, java.util.List<IMessage> messages)
      Creates a result instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getErrorCount()
      Returns the number of errors in the stored messages.
      IMessage getMessage​(int index)
      Returns the specific message.
      int getMessageCount()
      Returns the number of messages occurred during loading.
      M getModel​(int index)
      Returns the specified model.
      int getModelCount()
      Returns the number of loaded models.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • models

        private java.util.List<M extends IModel> models
      • messages

        private java.util.List<IMessage> messages
    • Constructor Detail

      • LoadResult

        public LoadResult​(java.util.List<M> models,
                          java.util.List<IMessage> messages)
        Creates a result instance.
        Parameters:
        models - the loaded models
        messages - the messages which occurred (may be null)
    • Method Detail

      • 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:
        java.lang.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:
        java.lang.IndexOutOfBoundsException - if index<0 || index>=getMessageCount()