Class BaseParameters

    • Field Detail

      • path

        protected String path
        Current path of the parameter file.
    • Constructor Detail

      • BaseParameters

        public BaseParameters()
        Creates a new BaseParameters object with a null path.
    • Method Detail

      • getPath

        public String getPath()
        Description copied from interface: IParameters
        Gets the full path of the last file where the parameters where loaded from or saved to.
        Specified by:
        getPath in interface IParameters
        Returns:
        the full path of the last load() or save(), or null if object was not loaded nor saved.
      • setPath

        public void setPath​(String filePath)
        Description copied from interface: IParameters
        Sets the full path of the file where the parameters are to be saved to.
        Specified by:
        setPath in interface IParameters
        Parameters:
        filePath - the full path to set.
      • load

        public void load​(URL inputURL,
                         boolean ignoreErrors)
        Description copied from interface: IParameters
        Loads the parameters from a file.
        Specified by:
        load in interface IParameters
        Parameters:
        inputURL - URL of the parameters file to load.
        ignoreErrors - true if the load should ignore any error such as file not found. If an error occurs and this is set to true, the method should create the parameters object with its default values.
      • load

        public void load​(InputStream inStream,
                         boolean ignoreErrors)
        Description copied from interface: IParameters
        Loads the parameters from a file.
        Specified by:
        load in interface IParameters
        Parameters:
        inStream - input stream with the parameters to load.
        ignoreErrors - true if the load should ignore any error such as file not found. If an error occurs and this is set to true, the method should create the parameters object with its default values.
      • save

        public void save​(String newPath)
        Description copied from interface: IParameters
        Saves the parameters to a file.
        Specified by:
        save in interface IParameters
        Parameters:
        newPath - the full path of the parameters file to save.
      • getParametersDescription

        public ParametersDescription getParametersDescription()
        Description copied from interface: IParameters
        Gets the description of the parameters.
        Specified by:
        getParametersDescription in interface IParameters
        Returns:
        the ParametersDescription object for this set of parameters, or null if none is provided.