Class BaseHostname

    • Constructor Detail

      • BaseHostname

        public BaseHostname()
        Initializes the string with localhost and no port.
      • BaseHostname

        public BaseHostname​(String s)
        Initializes the object with the hostname to parse.
        Parameters:
        s - the string to parse
    • Method Detail

      • isValid

        public boolean isValid​(String value)
        Checks whether the string value is a valid presentation for this class.
        Overrides:
        isValid in class AbstractBaseString
        Parameters:
        value - the string value to check
        Returns:
        true if non-null
      • hostnameValue

        public String hostnameValue()
        Returns the hostname part without the port.
        Returns:
        the hostname
      • portValue

        public int portValue()
        Returns the port part of the hostname, if available.
        Returns:
        the port, -1 if none specified
      • portValue

        public int portValue​(int defPort)
        Returns the port part of the hostname, if available.
        Parameters:
        defPort - the default port to use
        Returns:
        the port, defPort if none specified
      • hasFavoritesSupport

        public boolean hasFavoritesSupport()
        Whether this object should have favorites support.
        Overrides:
        hasFavoritesSupport in class BaseObject
        Returns:
        true if to support favorites
      • getTipText

        public String getTipText()
        Returns a tool tip for the GUI editor (ignored if null is returned).
        Specified by:
        getTipText in class AbstractBaseString
        Returns:
        the tool tip