public abstract class SpinJsonNode extends Spin<SpinJsonNode>
| Constructor and Description |
|---|
SpinJsonNode() |
| Modifier and Type | Method and Description |
|---|---|
abstract SpinJsonNode |
append(java.lang.Object property)
Appends a object to the end of the current array node
|
abstract java.lang.Boolean |
boolValue()
Get this node as a boolean value.
|
abstract boolean |
contains(java.lang.Object searchObject)
Returns
true if the array contains the specified object. |
abstract SpinJsonNode |
deleteProp(java.util.List<java.lang.String> names)
Removes a number of properties by a given list of names.
|
abstract SpinJsonNode |
deleteProp(java.lang.String name)
Remove a property of the given node by name.
|
abstract SpinList<SpinJsonNode> |
elements()
Get this node as list.
|
abstract java.util.List<java.lang.String> |
fieldNames()
Get the field names of this node (i.e.
|
abstract boolean |
hasProp(java.lang.String name)
Check if this node has a property with the given name.
|
abstract java.lang.Integer |
indexOf(java.lang.Object searchObject)
Fetches the first index of the searched object in an array.
|
abstract SpinJsonNode |
insertAfter(java.lang.Object searchObject,
java.lang.Object insertObject)
Inserts an object AFTER an specific object in an array
|
abstract SpinJsonNode |
insertAt(int index,
java.lang.Object property)
Appends an object at a specific point in an array
|
abstract SpinJsonNode |
insertBefore(java.lang.Object searchObject,
java.lang.Object insertObject)
Inserts an object BEFORE an specific object in an array
|
abstract java.lang.Boolean |
isArray()
Check if this node is a array value.
|
abstract java.lang.Boolean |
isBoolean()
Check if this node is a boolean value.
|
abstract java.lang.Boolean |
isNull()
Check if this node represents a null value.
|
abstract java.lang.Boolean |
isNumber()
Check if this node is a number value.
|
abstract boolean |
isObject()
Check if this node is an object node.
|
abstract java.lang.Boolean |
isString()
Check if this node is a string value.
|
abstract java.lang.Boolean |
isValue()
Check if this node is a value.
|
abstract SpinJsonPathQuery |
jsonPath(java.lang.String expression)
Creates a JsonPath query on this element.
|
abstract java.lang.Integer |
lastIndexOf(java.lang.Object searchObject)
Fetches the last index of the searched object in an array.
|
abstract java.lang.Number |
numberValue()
Get this node as a number value.
|
abstract SpinJsonNode |
prop(java.lang.String name)
Get the property of this node with the given name.
|
abstract SpinJsonNode |
prop(java.lang.String name,
boolean newProperty)
Set a new boolean property in this node.
|
abstract SpinJsonNode |
prop(java.lang.String name,
java.lang.Boolean newProperty)
Set a new Boolean property in this node.
|
abstract SpinJsonNode |
prop(java.lang.String name,
float newProperty)
Set a new float property in this node.
|
abstract SpinJsonNode |
prop(java.lang.String name,
int newProperty)
Set a new int property in this node.
|
abstract SpinJsonNode |
prop(java.lang.String name,
java.util.List<java.lang.Object> newProperty)
Set a new List property in this node.
|
abstract SpinJsonNode |
prop(java.lang.String name,
long newProperty)
Set a new long property in this node.
|
abstract SpinJsonNode |
prop(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> newProperty)
Set a new Map property in this node.
|
abstract SpinJsonNode |
prop(java.lang.String name,
java.lang.Number newProperty)
Set a new Number property in this node.
|
abstract SpinJsonNode |
prop(java.lang.String name,
SpinJsonNode newProperty)
Set a new SpinJsonNode Object property in this node.
|
abstract SpinJsonNode |
prop(java.lang.String name,
java.lang.String newProperty)
Set a new String property in this node.
|
abstract SpinJsonNode |
remove(java.lang.Object property)
Removes the first appearance of an object from the current array
|
abstract SpinJsonNode |
removeAt(int index)
removes an object at the specific index of the current array
|
abstract SpinJsonNode |
removeLast(java.lang.Object property)
Removes the last appearance of an object from the current array
|
abstract java.lang.String |
stringValue()
Get this node as a string value.
|
abstract java.lang.Object |
value()
Gets the actual value of the node, in case it is a Boolean/String/Number/Null node.
|
public abstract java.lang.Integer indexOf(java.lang.Object searchObject)
searchObject - Object for which the index should be searched.Integer index of searchObject.SpinJsonException - if the current node is not an array.SpinJsonPropertyException - if object is not found.public abstract java.lang.Integer lastIndexOf(java.lang.Object searchObject)
searchObject - Object for which the index should be searched.Integer index of searchObject.SpinJsonException - if the current node is not an array.SpinJsonPropertyException - if object is not found.public abstract boolean contains(java.lang.Object searchObject)
true if the array contains the specified object.searchObject - Object for which the array should be searched.true if the array contains the object.SpinJsonException - if the current node is not an array.public abstract boolean isObject()
public abstract boolean hasProp(java.lang.String name)
name - the name of the propertypublic abstract SpinJsonNode prop(java.lang.String name)
name - the name of the propertySpinJsonNode representation of the propertypublic abstract SpinJsonNode prop(java.lang.String name, java.lang.String newProperty)
name - the name of the new propertynewProperty - the new String propertySpinJsonNode representation of the current nodepublic abstract SpinJsonNode prop(java.lang.String name, java.lang.Number newProperty)
name - the name of the new propertynewProperty - the new Number propertySpinJsonNode representation of the current nodepublic abstract SpinJsonNode prop(java.lang.String name, int newProperty)
name - the name of the new propertynewProperty - the new int propertySpinJsonNode representation of the current nodepublic abstract SpinJsonNode prop(java.lang.String name, float newProperty)
name - the name of the new propertynewProperty - the new float propertySpinJsonNode representation of the current nodepublic abstract SpinJsonNode prop(java.lang.String name, long newProperty)
name - the name of the new propertynewProperty - the new long propertySpinJsonNode representation of the current nodepublic abstract SpinJsonNode prop(java.lang.String name, boolean newProperty)
name - the name of the new propertynewProperty - the new boolean propertySpinJsonNode representation of the current nodepublic abstract SpinJsonNode prop(java.lang.String name, java.lang.Boolean newProperty)
name - the name of the new propertynewProperty - the new Boolean propertySpinJsonNode representation of the current nodepublic abstract SpinJsonNode prop(java.lang.String name, java.util.List<java.lang.Object> newProperty)
name - the name of the new propertynewProperty - the new List propertySpinJsonNode representation of the current nodepublic abstract SpinJsonNode prop(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> newProperty)
name - the name of the new propertynewProperty - the new Map propertySpinJsonNode representation of the current nodepublic abstract SpinJsonNode prop(java.lang.String name, SpinJsonNode newProperty)
name - the name of the new propertynewProperty - the new SpinJsonNode Object propertySpinJsonNode representation of the current nodepublic abstract SpinJsonNode deleteProp(java.lang.String name)
name - name of the propertySpinJsonNode representation of the current nodepublic abstract SpinJsonNode deleteProp(java.util.List<java.lang.String> names)
names - list of namesSpinJsonNode representation of the current nodepublic abstract SpinJsonNode append(java.lang.Object property)
property - property which should be appendSpinJsonNode representation of the current nodepublic abstract SpinJsonNode insertAt(int index, java.lang.Object property)
index - Index in current node where the new property should be appended.property - Object which should be appended.SpinJsonNode representation of the current node.java.lang.IllegalArgumentException - if index is out of bound.public abstract SpinJsonNode insertBefore(java.lang.Object searchObject, java.lang.Object insertObject)
searchObject - Object which is searchedinsertObject - Object which will be insertedSpinJsonNode representation of the current nodepublic abstract SpinJsonNode insertAfter(java.lang.Object searchObject, java.lang.Object insertObject)
searchObject - Object which is searchedinsertObject - Object which will be insertedSpinJsonNode representation of the current nodepublic abstract SpinJsonNode remove(java.lang.Object property)
property - object which should be deletedSpinJsonNode representation of the current nodepublic abstract SpinJsonNode removeLast(java.lang.Object property)
property - object which should be deletedSpinJsonNode representation of the current nodepublic abstract SpinJsonNode removeAt(int index)
index - Index of the arraySpinJsonNode representation of the current nodejava.lang.IllegalArgumentException - if index is out of bound.public abstract java.lang.Boolean isBoolean()
public abstract java.lang.Boolean boolValue()
SpinDataFormatException - if this node is not a boolean valuepublic abstract java.lang.Boolean isNumber()
public abstract java.lang.Number numberValue()
SpinDataFormatException - if this node is not a number valuepublic abstract java.lang.Boolean isString()
public abstract java.lang.String stringValue()
SpinDataFormatException - if this node is not a string valuepublic abstract java.lang.Boolean isNull()
public abstract java.lang.Boolean isValue()
public abstract java.lang.Object value()
SpinDataFormatException - if this node is not a Boolean/String/Number/Nul valuepublic abstract java.lang.Boolean isArray()
public abstract SpinList<SpinJsonNode> elements()
SpinList which contains copies of all
JSON nodes contained in the current node. Changes to the the elements in the list will not propagate
to the original nodes.SpinDataFormatException - if this node is not an arraypublic abstract java.util.List<java.lang.String> fieldNames()
SpinDataFormatException - if this node is not a array valuepublic abstract SpinJsonPathQuery jsonPath(java.lang.String expression)
expression - the JsonPath expressionCopyright © 2014–2022 Camunda Services GmbH. All rights reserved.