Class RecentFilesHandlerWithCommandline.Setup

  • Enclosing class:
    RecentFilesHandlerWithCommandline<M>

    public static class RecentFilesHandlerWithCommandline.Setup
    extends Object
    Container class for storing file and optionhandler alongside. Format: file TAB commandline
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • m_File

        protected File m_File
        the file.
      • m_Handler

        protected Object m_Handler
        the object.
    • Constructor Detail

      • Setup

        public Setup​(File file,
                     Object handler)
        Initializes the setup container.
        Parameters:
        file - the file to store
        handler - the object to store
      • Setup

        public Setup​(String s)
        Initializes the setup container using the string.
        Parameters:
        s - the string to use
    • Method Detail

      • getFile

        public File getFile()
        Returns the file.
        Returns:
        the file
      • getHandler

        public Object getHandler()
        Returns the handler.
        Returns:
        the handler (copy)
      • check

        public boolean check()
        Performs a check whether this setup is valid.
        Returns:
        true if valid setup
      • toString

        public String toString()
        Returns the container setup as string.
        Overrides:
        toString in class Object
        Returns:
        the string
      • hashCode

        public int hashCode()
        Returns the hashCode of the file's absolute path.
        Overrides:
        hashCode in class Object
        Returns:
        the hashcode, -1 if no file set
      • equals

        public boolean equals​(Object obj)
        Returns true if the other object is also a RecentFilesHandlerWithCommandline.Setup instance and contains the same file.
        Overrides:
        equals in class Object
        Parameters:
        obj - the other object to compare with
        Returns:
        true if exactly the same