|
JSON Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.map.JsonNode
org.codehaus.jackson.map.impl.ValueNode
public abstract class ValueNode
This intermediate base class is used for all leaf nodes, that is, all non-container (array or object) nodes, except for the "missing node".
Constructor Summary | |
---|---|
protected |
ValueNode()
|
Method Summary | |
---|---|
JsonNode |
getPath(int index)
This method is similar to JsonNode.getElementValue(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. |
JsonNode |
getPath(String fieldName)
This method is similar to JsonNode.getFieldValue(java.lang.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. |
boolean |
isValueNode()
Method that returns true for all value nodes: ones that are not containers, and that do not represent "missing" nodes in the path. |
String |
toString()
Let's mark this standard method as abstract to ensure all implementation classes define it |
Methods inherited from class org.codehaus.jackson.map.JsonNode |
---|
appendElement, equals, getBooleanValue, getDecimalValue, getDoubleValue, getElements, getElementValue, getFieldNames, getFieldValue, getFieldValues, getIntValue, getLongValue, getNumberValue, getTextValue, getValueAsText, insertElement, isArray, isBigDecimal, isBoolean, isContainerNode, isDouble, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isObject, isTextual, removeElement, removeElement, reportNoArrayMods, reportNoObjectMods, setElement, setElement, size, writeTo |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ValueNode()
Method Detail |
---|
public boolean isValueNode()
JsonNode
Note: one and only one of methods JsonNode.isValueNode()
,
JsonNode.isContainerNode()
and JsonNode.isMissingNode()
ever
returns true for any given node.
isValueNode
in class JsonNode
public JsonNode getPath(String fieldName)
JsonNode
JsonNode.getFieldValue(java.lang.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.
getPath
in class JsonNode
public JsonNode getPath(int index)
JsonNode
JsonNode.getElementValue(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.
getPath
in class JsonNode
public String toString()
JsonNode
toString
in class JsonNode
|
JSON Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |