Class ContentHandlerFavorites.ContentHandlerFavorite

    • Field Detail

      • m_Extension

        protected String m_Extension
        the extension.
      • m_Name

        protected String m_Name
        the name of the favorite.
      • m_Commandline

        protected String m_Commandline
        the handler commandline.
    • Constructor Detail

      • ContentHandlerFavorite

        public ContentHandlerFavorite​(String ext,
                                      String name,
                                      ContentHandler handler)
        Initializes the favorite.
        Parameters:
        ext - the extension
        name - the name
        handler - the handler
      • ContentHandlerFavorite

        public ContentHandlerFavorite​(String ext,
                                      String name,
                                      String cmdline)
        Initializes the favorite.
        Parameters:
        ext - the extension
        name - the name
        cmdline - the handler commandline
    • Method Detail

      • getExtension

        public String getExtension()
        Returns the extension of the favorite.
        Returns:
        the extension
      • getName

        public String getName()
        Returns the name of the favorite.
        Returns:
        the name
      • getCommandline

        public String getCommandline()
        Returns the commandline of the favorite.
        Returns:
        the commandline
      • getHandler

        public ContentHandler getHandler()
        Returns a new handler instance.
        Returns:
        the instance, null if failed to instantiate
      • toString

        public String toString()
        Returns a string representation of the object.
        Overrides:
        toString in class Object
        Returns:
        the string representation
      • equals

        public boolean equals​(Object o)
        Checks whether the object is the same as itself (using the name).
        Overrides:
        equals in class Object
        Parameters:
        o - the object to compare with
        Returns:
        true if a content handler favorite with the same name
      • hashCode

        public int hashCode()
        Returns the hash code of the name.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code