Class JmesPathRuntime.Value

  • Enclosing class:
    JmesPathRuntime

    public static final class JmesPathRuntime.Value
    extends Object
    An intermediate value for JMESPath expressions, encapsulating the different data types supported by JMESPath and the operations on that data.
    • Constructor Detail

      • Value

        public Value​(Object value)
        Create a non-projection value, where the value type is determined reflectively.
    • Method Detail

      • value

        public Object value()
        Retrieve the actual value that this represents (this will be the same value passed to the constructor).
      • values

        public List<Object> values()
        Retrieve the actual value that this represents, as a list of object.
      • booleanValue

        public Boolean booleanValue()
        Retrieve the actual value that this represents, as a Boolean. Note that only null, boolean and string types are supported.
      • stringValue

        public String stringValue()
        Retrieve the actual value that this represents, as a String. Note that collection types are not supported.
      • stringValues

        public List<String> stringValues()
        Retrieve the actual value that this represents, as a list of String. Note that if the contents of the list is not String, a value is thrown. If the value has a different type, the code makes a best effort to return a single element list of String. See stringValue.
      • constant

        public JmesPathRuntime.Value constant​(Object constant)
        Convert this value to a new constant value, discarding the current value.
      • wildcard

        public JmesPathRuntime.Value wildcard()
        Execute a wildcard expression on this value: https://jmespath.org/specification.html#wildcard-expressions
      • flatten

        public JmesPathRuntime.Value flatten()
        Execute a flattening expression on this value: https://jmespath.org/specification.html#flatten-operator
      • field

        public JmesPathRuntime.Value field​(String fieldName)
        Retrieve an identifier from this value: https://jmespath.org/specification.html#identifiers
      • length

        public JmesPathRuntime.Value length()
        Execute the length function, with this value as the first parameter: https://jmespath.org/specification.html#length
      • not

        public JmesPathRuntime.Value not()
        Perform a NOT conversion on this value: https://jmespath.org/specification.html#not-expressions
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object