public class JSONNumberNode extends JSONNode implements freemarker.template.TemplateNumberModel
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_NODE_NAME |
static java.lang.String |
NODE_TYPE |
Constructor and Description |
---|
JSONNumberNode(JSONNode parentNode,
java.lang.String nodeName,
java.lang.Number value) |
Modifier and Type | Method and Description |
---|---|
java.lang.Number |
getAdaptedObject(java.lang.Class<?> hint)
Returns the plain Java object wrapped into this node.
|
java.lang.Number |
getAsNumber() |
freemarker.template.TemplateSequenceModel |
getChildNodes()
Always returns
null . |
protected java.lang.String |
getDefaultNodeName()
Returns the name of the node if it has no explicit name.
|
java.lang.String |
getNodeType()
Returns
NODE_TYPE . |
getNodeName, getNodeNamespace, getParentNode, nodeTypeToDefaultNodeName, wrap, wrap
public static final java.lang.String NODE_TYPE
public static final java.lang.String DEFAULT_NODE_NAME
public JSONNumberNode(JSONNode parentNode, java.lang.String nodeName, java.lang.Number value)
public freemarker.template.TemplateSequenceModel getChildNodes() throws freemarker.template.TemplateModelException
null
.getChildNodes
in interface freemarker.template.TemplateNodeModel
freemarker.template.TemplateModelException
public java.lang.String getNodeType() throws freemarker.template.TemplateModelException
NODE_TYPE
.getNodeType
in interface freemarker.template.TemplateNodeModel
freemarker.template.TemplateModelException
public java.lang.Number getAsNumber() throws freemarker.template.TemplateModelException
getAsNumber
in interface freemarker.template.TemplateNumberModel
freemarker.template.TemplateModelException
protected java.lang.String getDefaultNodeName()
JSONNode
JSONNode.JSONNode(JSONNode, String)
constructor if its second argument is null
.getDefaultNodeName
in class JSONNode
JSONNode.nodeTypeToDefaultNodeName(String)
public java.lang.Number getAdaptedObject(java.lang.Class<?> hint)
getAdaptedObject
in interface freemarker.template.AdapterTemplateModel