Class StringNode

    • Constructor Detail

      • StringNode

        public StringNode()
        Creates a new un-initialized StringNode.
      • StringNode

        public StringNode​(String value)
        Creates a new StringNode, initialized to value.
        Parameters:
        value - the value of this StringNode.
    • Method Detail

      • value

        public String value()
        Returns the value of this string. Same as getValue() since the value of this node is a String (but implementations in other LeafNode sub-classes differ).
        Overrides:
        value in class LeafNode<String>
        Returns:
        the string representation of this StringNode, or null if the vlaue is explicitly set to null
      • getValue

        public String getValue()
        Description copied from class: LeafNode
        Subclasses must implement this, in compliance with the rules given in the return tag.
        Specified by:
        getValue in class LeafNode<String>
        Returns:
        the String representation of the node value, or the 'null' object if the node value is null.
      • toString

        public String toString()
        Description copied from class: LeafNode
        Subclasses must implement this, in compliance with the rules given in the return tag.
        Specified by:
        toString in class LeafNode<String>
        Returns:
        the String representation of the node value, or the string "(null)" if the value is null.
      • unescapeQuotedString

        public static String unescapeQuotedString​(String string)
        Remove character escape codes.
        Parameters:
        string - escaped string
        Returns:
        unescaped string
      • doSetValue

        protected boolean doSetValue​(String value)
        Sets the value of this string from a the string representation of this value in the (escaped) input configuration. The value supplied to this method needs un-escaping and will be un-escaped.
        Specified by:
        doSetValue in class LeafNode<String>
        Parameters:
        value - the new value of this node.