public interface Adapter<T> extends JmesPath<T>, Comparator<T>
| Modifier and Type | Method and Description |
|---|---|
T |
createArray(Collection<T> elements)
Returns an array value with the specified elements.
|
T |
createBoolean(boolean b)
Returns a boolean value containing the specified boolean.
|
T |
createNull()
Returns a null value (not Java
null). |
T |
createNumber(double n)
Returns a number value containing the specified floating point number.
|
T |
createNumber(long n)
Returns a number value containing the specified integer.
|
T |
createObject(Map<T,T> obj)
Returns an object value with the specified properties.
|
T |
createString(String str)
Returns a string value containing the specified string.
|
FunctionRegistry |
functionRegistry()
Returns a function registry that can be used by the expression compiler
to look up functions.
|
T |
getProperty(T value,
String name)
Deprecated.
|
T |
getProperty(T value,
T name)
Returns the value of a property of an object.
|
Collection<T> |
getPropertyNames(T value)
Returns all the property names of the given object, or an empty collection
when the given value does not represent an object.
|
T |
handleArgumentTypeError(Function function,
String expectedType,
String actualType)
Throws an exception or returns a fallback value when a type check fails
during a function call evaluation.
|
boolean |
isTruthy(T value)
Returns true when the argument is truthy.
|
NodeFactory<T> |
nodeFactory()
Returns a node factory that can be used by the expression compiler to build
the interpreter AST.
|
T |
parseString(String str)
Parse a JSON string to a value.
|
List<T> |
toList(T value)
Converts the argument to a
List. |
Number |
toNumber(T value)
Converts the argument to a
Number, or null if the argument does not
represent a number. |
String |
toString(T value)
Converts the argument to a
String. |
JmesPathType |
typeOf(T value)
Returns the JSON type of the argument.
|
compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongT parseString(String str)
List<T> toList(T value)
List.
When the argument represents an array the list will contain the elements of
the array, when the argument represents an object the result is a list of
the object's values and for all other types the result is an empty list.String toString(T value)
String. When the argument represents a string
its string value is returned, otherwise a string with the value encoded
as JSON is returned.Number toNumber(T value)
Number, or null if the argument does not
represent a number.boolean isTruthy(T value)
false, null, empty lists, empty
objects, empty strings.JmesPathType typeOf(T value)
number,
string, boolean, array,
object, null.JmesPathType@Deprecated T getProperty(T value, String name)
null) is returned.T getProperty(T value, T name)
Collection<T> getPropertyNames(T value)
T createNull()
null).T createArray(Collection<T> elements)
T createBoolean(boolean b)
T createObject(Map<T,T> obj)
T createNumber(double n)
T createNumber(long n)
T handleArgumentTypeError(Function function, String expectedType, String actualType)
FunctionRegistry functionRegistry()
NodeFactory<T> nodeFactory()
Copyright © 2016–2023. All rights reserved.