Class AbstractBaseString

    • Constructor Detail

      • AbstractBaseString

        protected AbstractBaseString()
        Initializes the string with length 0.
      • AbstractBaseString

        protected AbstractBaseString​(String s)
        Initializes the object with the string to parse.
        Parameters:
        s - the string to parse
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the internal object.

        Uses empty string.
        Overrides:
        initialize in class BaseObject
      • isValid

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

        protected String convert​(String value)
        Converts the string according to the specified conversion.

        Default implementation performs no conversion.
        Parameters:
        value - the string to convert
        Returns:
        the converted string
      • setValue

        public void setValue​(String value)
        Sets the string value.

        Calls convert(String) first before checking validity or setting the value (if valid).
        Specified by:
        setValue in class BaseObject
        Parameters:
        value - the string value
      • getValue

        public String getValue()
        Returns the current string value.
        Specified by:
        getValue in class BaseObject
        Returns:
        the string value
      • stringValue

        public String stringValue()
        Returns the String value.
        Returns:
        the String value
      • isEmpty

        public boolean isEmpty()
        Whether the string is empty, i.e., "".
        Returns:
        true if the string is empty, i.e., length 0
      • length

        public int length()
        Returns the length of the string.
        Returns:
        the length
      • getTipText

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