Package adams.core.io

Class AbstractFilenameGenerator

    • Constructor Detail

      • AbstractFilenameGenerator

        public AbstractFilenameGenerator()
    • Method Detail

      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.

        Default implementation returns null.
        Specified by:
        getQuickInfo in interface QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string
      • canHandleNullObject

        public abstract boolean canHandleNullObject()
        Returns whether we actually need an object to generate the filename.
        Returns:
        true if object required
      • check

        protected void check​(Object obj)
        Performs checks on the object to generate the filename for.

        Default implementation only checks whether object is null (if one is required).
        Parameters:
        obj - the object to check
      • doGenerate

        protected abstract String doGenerate​(Object obj)
        Performs the actual generation of the filename.
        Parameters:
        obj - the object to generate the filename for
        Returns:
        the generated filename
      • generate

        public String generate​(Object obj)
        Generates a filename for the object.
        Parameters:
        obj - the object to generate the filename for
        Returns:
        the generated filename