public abstract class AbstractJNode extends java.lang.Object implements JNode, JInstrumentalNode, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected JInstrumentalNode |
parent
Parent node in node tree.
|
protected JNodeType |
type
Type of the node.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractJNode()
Constructor.
|
protected |
AbstractJNode(JNode fParent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract JNode |
clone()
Return copy of this object, detached from node tree.
|
boolean |
equals(java.lang.Object obj) |
java.util.Set<java.lang.String> |
fieldNames()
Returns set of field names.
|
java.util.List<JNode> |
getChildren()
Returns set of all children of composite (Object or Array) node.
|
JNode |
getDocRoot()
Returns root node of the tree.
|
java.lang.String |
getKey()
Return key of JNode (JObjectNode or JArrayNode).
|
JNode |
getParent()
Return parent node of this node in node tree.
|
java.lang.String[] |
getPath()
Return path of this node.
|
JNodeType |
getType()
Returns a type of the node.
|
<V> V |
getValue()
Return value of JValueNode.
|
<T> T |
getValue(java.lang.Class<T> pType)
Return value of JValueNode.
|
int |
hashCode() |
java.util.Iterator<JNode> |
iterator()
Returns iterator over elements of composite node.
|
JNode |
setKey(java.lang.String pKey)
Set key for JNode.
|
<V> void |
setValue(V v)
Set value of V type for this node.
|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addNode, addNode, getNode, removeNode, removeNode, toJson, toString
protected JInstrumentalNode parent
protected JNodeType type
protected AbstractJNode()
protected AbstractJNode(JNode fParent)
fParent
- reference to parent node.public JNodeType getType()
JNode
public <V> void setValue(V v)
JNode
public <V> V getValue()
JNode
public <T> T getValue(java.lang.Class<T> pType)
JNode
public JNode getParent()
JNode
public JNode getDocRoot()
JInstrumentalNode
getDocRoot
in interface JInstrumentalNode
public java.lang.String[] getPath()
JInstrumentalNode
getPath
in interface JInstrumentalNode
public java.util.Iterator<JNode> iterator()
JNode
public java.util.List<JNode> getChildren()
JNode
getChildren
in interface JNode
public java.util.Set<java.lang.String> fieldNames()
JInstrumentalNode
fieldNames
in interface JInstrumentalNode
public abstract JNode clone()
JNode
public java.lang.String getKey()
JInstrumentalNode
getKey
in interface JInstrumentalNode
public JNode setKey(java.lang.String pKey)
JInstrumentalNode
setKey
in interface JInstrumentalNode
pKey
- the key to setpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object