com.fasterxml.jackson.databind.node

Class ValueNode

    • Constructor Detail

      • ValueNode

        protected ValueNode()
    • Method Detail

      • deepCopy

        public <T extends JsonNode> T deepCopy()
        All current value nodes are immutable, so we can just return them as is.
        Specified by:
        deepCopy in class JsonNode
        Returns:
        Node that is either a copy of this node (and all non-leaf children); or, for immutable leaf nodes, node itself.
      • asToken

        public abstract JsonToken asToken()
        Description copied from class: BaseJsonNode
        Method that can be used for efficient type detection when using stream abstraction for traversing nodes. Will return the first JsonToken that equivalent stream event would produce (for most nodes there is just one token but for structured/container types multiple)
        Specified by:
        asToken in interface TreeNode
        Specified by:
        asToken in class BaseJsonNode
      • path

        public JsonNode path(String fieldName)
        Description copied from class: JsonNode
        This method is similar to JsonNode.get(String), except that instead of returning null if no such value exists (due to this node not being an object, or object not having value for the specified field), a "missing node" (node that returns true for JsonNode.isMissingNode()) will be returned. This allows for convenient and safe chained access via path calls.
        Specified by:
        path in class JsonNode
      • path

        public JsonNode path(int index)
        Description copied from class: JsonNode
        This method is similar to JsonNode.get(int), except that instead of returning null if no such element exists (due to index being out of range, or this node not being an array), a "missing node" (node that returns true for JsonNode.isMissingNode()) will be returned. This allows for convenient and safe chained access via path calls.
        Specified by:
        path in class JsonNode
      • toString

        public String toString()
        Description copied from class: JsonNode

        Note: marked as abstract to ensure all implementation classes define it properly.

        Specified by:
        toString in class JsonNode

Copyright © 2012 FasterXML. All Rights Reserved.