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