Package com.yahoo.config
Class StringNode
- All Implemented Interfaces:
Cloneable
A StringNode class represents a string in a
ConfigInstance
.- Author:
- larschr
-
Field Summary
Fields inherited from class com.yahoo.config.LeafNode
initialized, value
-
Constructor Summary
ConstructorDescriptionCreates a new un-initialized StringNode.StringNode
(String value) Creates a new StringNode, initialized tovalue
. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
doSetValue
(String value) Sets the value of this string from the string representation of this value in the (escaped) input configuration.getValue()
Subclasses must implement this, in compliance with the rules given in the return tag.toString()
Subclasses must implement this, in compliance with the rules given in the return tag.static String
unescapeQuotedString
(String string) Remove character escape codes.value()
Returns the value of this string.Methods inherited from class com.yahoo.config.Node
postInitialize
-
Constructor Details
-
StringNode
public StringNode()Creates a new un-initialized StringNode. -
StringNode
Creates a new StringNode, initialized tovalue
.- Parameters:
value
- the value of this StringNode.
-
-
Method Details
-
value
Returns the value of this string. Same asgetValue()
since the value of this node is a String (but implementations in otherLeafNode
subclasses differ). -
getValue
Description copied from class:LeafNode
Subclasses must implement this, in compliance with the rules given in the return tag. -
toString
Description copied from class:LeafNode
Subclasses must implement this, in compliance with the rules given in the return tag. -
unescapeQuotedString
Remove character escape codes.- Parameters:
string
- escaped string- Returns:
- unescaped string
-
doSetValue
Sets the value of this string from 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 classLeafNode<String>
- Parameters:
value
- the new value of this node.
-