Class JPropNode
java.lang.Object
com.fasterxml.jackson.dataformat.javaprop.util.JPropNode
Value in an ordered tree presentation built from an arbitrarily ordered
set of flat input values. Since either index- OR name-based access is to
be supported (similar to, say, Javascript objects) -- but only one, not both --
storage is bit of a hybrid. In addition, branches may also have values.
So, code does bit coercion as necessary, trying to maintain something
consistent and usable at all times, without failure.
-
Field Summary
FieldsModifier and TypeFieldDescriptionChild entries with integral number index, if any.Child entries accessed with String property name, if any.protected booleanprotected StringValue for the path, for leaf nodes; usually null for branches. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddByIndex(int index) asRaw()Helper method, mostly for debugging/testing, to convert structure contained into simple List/Map/String equivalent.getValue()booleanisArray()booleanisLeaf()Child entries accessed with String property name, if any.
-
Field Details
-
_value
Value for the path, for leaf nodes; usually null for branches. If both children and value exists, typically need to construct bogus value with empty String key. -
_byIndex
-
_byName
-
_hasContents
protected boolean _hasContents
-
-
Constructor Details
-
JPropNode
public JPropNode()
-
-
Method Details
-
setValue
-
addByIndex
-
addByName
-
isLeaf
public boolean isLeaf() -
isArray
public boolean isArray() -
getValue
-
arrayContents
-
objectContents
-
asRaw
Helper method, mostly for debugging/testing, to convert structure contained into simple List/Map/String equivalent.
-