Top Description Fields Constructors Methods
com.fasterxml.jackson.dataformat.javaprop.util

public Class JPropNode

extends Object
Class Inheritance
Imports
java.util.*

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

Modifier and TypeField and Description
protected TreeMap<Integer, JPropNode>
_byIndex

Child entries with integral number index, if any.

protected Map<String, JPropNode>
_byName

Child entries accessed with String property name, if any.

protected boolean
protected String
_value

Value for the path, for leaf nodes; usually null for branches.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JPropNode
addByIndex(int index)

public JPropNode
public Iterator<JPropNode>
public Object
asRaw()

Helper method, mostly for debugging/testing, to convert structure contained into simple List/Map/String equivalent.

public String
public boolean
public boolean
public Iterator<Map.Entry<String, JPropNode>>
objectContents()

Child entries accessed with String property name, if any.

public JPropNode
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_byIndexback to summary
protected TreeMap<Integer, JPropNode> _byIndex

Child entries with integral number index, if any.

_byNameback to summary
protected Map<String, JPropNode> _byName

Child entries accessed with String property name, if any.

_hasContentsback to summary
protected boolean _hasContents
_valueback to summary
protected String _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.

Constructor Detail

JPropNodeback to summary
public JPropNode()

Method Detail

addByIndexback to summary
public JPropNode addByIndex(int index)
addByNameback to summary
public JPropNode addByName(String name)
arrayContentsback to summary
public Iterator<JPropNode> arrayContents()
asRawback to summary
public Object asRaw()

Helper method, mostly for debugging/testing, to convert structure contained into simple List/Map/String equivalent.

getValueback to summary
public String getValue()
isArrayback to summary
public boolean isArray()
isLeafback to summary
public boolean isLeaf()
objectContentsback to summary
public Iterator<Map.Entry<String, JPropNode>> objectContents()

Child entries accessed with String property name, if any.

setValueback to summary
public JPropNode setValue(String v)