class JSONPathSingle extends JSONPath
JSONPath.Context, JSONPath.Feature, JSONPath.PreviousPath, JSONPath.RootPath, JSONPath.Sequence| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
extractSupport |
(package private) boolean |
ref |
(package private) JSONPathSegment |
segment |
features, PARSE_CONTEXT, path, readerContext, writerContext| Constructor and Description |
|---|
JSONPathSingle(JSONPathSegment segment,
java.lang.String path,
JSONPath.Feature... features) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.lang.Object root)
Checks if the path exists in the object
|
boolean |
equals(java.lang.Object object) |
java.lang.Object |
eval(java.lang.Object root)
Evaluates the path on the object
|
java.lang.Object |
extract(JSONReader jsonReader)
Extracts a value using the provided JSONReader
|
java.lang.String |
extractScalar(JSONReader jsonReader)
Extracts a scalar value using the provided JSONReader
|
JSONPath |
getParent()
Gets the parent JSONPath of this path
|
int |
hashCode() |
boolean |
isRef()
Checks if this path is a reference
|
boolean |
remove(java.lang.Object root)
Removes a value from the object
|
void |
set(java.lang.Object root,
java.lang.Object value)
Sets a value in the object
|
void |
set(java.lang.Object root,
java.lang.Object value,
JSONReader.Feature... readerFeatures)
Sets a value in the object with specified reader features
|
void |
setCallback(java.lang.Object root,
java.util.function.BiFunction callback)
Sets a callback function for the object
|
void |
setInt(java.lang.Object root,
int value)
Sets an integer value in the object
|
void |
setLong(java.lang.Object root,
long value)
Sets a long value in the object
|
arrayAdd, compile, compile, contains, createContext, endsWithFilter, eval, eval, extract, extract, extract, extract, extract, extract, extractInt32, extractInt32Value, extractInt64, extractInt64Value, extractScalar, getReaderContext, getWriterContext, isPrevious, of, of, of, of, of, of, of, of, parseOperator, paths, paths, remove, remove, set, set, setCallback, setCallback, setCallback, setReaderContext, setWriterContext, toStringfinal JSONPathSegment segment
final boolean ref
final boolean extractSupport
JSONPathSingle(JSONPathSegment segment, java.lang.String path, JSONPath.Feature... features)
public boolean remove(java.lang.Object root)
JSONPathpublic boolean contains(java.lang.Object root)
JSONPathpublic boolean isRef()
JSONPathpublic java.lang.Object eval(java.lang.Object root)
JSONPathpublic void set(java.lang.Object root,
java.lang.Object value)
JSONPathpublic void set(java.lang.Object root,
java.lang.Object value,
JSONReader.Feature... readerFeatures)
JSONPathpublic void setCallback(java.lang.Object root,
java.util.function.BiFunction callback)
JSONPathsetCallback in class JSONPathroot - the object to modifycallback - the callback function to setpublic void setInt(java.lang.Object root,
int value)
JSONPathpublic void setLong(java.lang.Object root,
long value)
JSONPathpublic java.lang.Object extract(JSONReader jsonReader)
JSONPathpublic java.lang.String extractScalar(JSONReader jsonReader)
JSONPathextractScalar in class JSONPathjsonReader - the JSONReader to usepublic final JSONPath getParent()
JSONPathpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object