Package fmpp.models

Class JSONNumberNode

java.lang.Object
fmpp.models.JSONNode
fmpp.models.JSONNumberNode
All Implemented Interfaces:
freemarker.template.AdapterTemplateModel, freemarker.template.TemplateModel, freemarker.template.TemplateNodeModel, freemarker.template.TemplateNumberModel, Serializable

public class JSONNumberNode extends JSONNode implements freemarker.template.TemplateNumberModel
JSON "number" value; see http://www.json.org/.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getChildNodes

      public freemarker.template.TemplateSequenceModel getChildNodes() throws freemarker.template.TemplateModelException
      Always returns null.
      Specified by:
      getChildNodes in interface freemarker.template.TemplateNodeModel
      Throws:
      freemarker.template.TemplateModelException
    • getNodeType

      public String getNodeType() throws freemarker.template.TemplateModelException
      Returns NODE_TYPE.
      Specified by:
      getNodeType in interface freemarker.template.TemplateNodeModel
      Throws:
      freemarker.template.TemplateModelException
    • getAsNumber

      public Number getAsNumber() throws freemarker.template.TemplateModelException
      Specified by:
      getAsNumber in interface freemarker.template.TemplateNumberModel
      Throws:
      freemarker.template.TemplateModelException
    • getDefaultNodeName

      protected String getDefaultNodeName()
      Description copied from class: JSONNode
      Returns the name of the node if it has no explicit name. This is normally called by the JSONNode(JSONNode, String) constructor if its second argument is null.
      Specified by:
      getDefaultNodeName in class JSONNode
      See Also:
    • getAdaptedObject

      public Number getAdaptedObject(Class<?> hint)
      Returns the plain Java object wrapped into this node.
      Specified by:
      getAdaptedObject in interface freemarker.template.AdapterTemplateModel
      Since:
      0.9.16