Class AbstractExperimentIO<T>

    • Field Detail

      • m_FileChooser

        protected BaseFileChooser m_FileChooser
        the filechooser for experiments.
    • Constructor Detail

      • AbstractExperimentIO

        public AbstractExperimentIO()
    • Method Detail

      • createFileChooser

        protected abstract BaseFileChooser createFileChooser()
        Creates and returns a file chooser for loading/saving experiments.
        Returns:
        the file chooser
      • getFileChooser

        public BaseFileChooser getFileChooser()
        Returns the file chooser to use.
        Returns:
        the file chooser
      • create

        public abstract T create()
        Creates a new experiment.
        Returns:
        the generated experiment, null if failed
      • load

        public abstract T load​(File file)
        Loads an experiment.
        Parameters:
        file - the file to load
        Returns:
        the experiment, null if failed to load
      • save

        public abstract boolean save​(T exp,
                                     File file)
        Saves an experiment.
        Parameters:
        exp - the experiment to save
        file - the file to save to
        Returns:
        false if failed to save
      • getExperimentClass

        public abstract Class getExperimentClass()
        Returns the experiment superclass/interface.
        Returns:
        the super class/interface
      • getSupportedFileExtensions

        public abstract String[] getSupportedFileExtensions​(boolean read)
        Returns the supported file extensions.
        Parameters:
        read - whether for reading or writing
        Returns:
        the extensions (no dot)