Class ParseResult<T>

java.lang.Object
software.amazon.awssdk.codegen.jmespath.parser.ParseResult<T>

public final class ParseResult<T> extends Object
The result of a Parser.parse(int, int) call. This is either successful (success(T)) or an error (error()).
  • Method Details

    • success

      public static <T> ParseResult<T> success(T result)
      Create a successful result with the provided value.
    • error

      public static <T> ParseResult<T> error()
      Create an error result.
    • mapResult

      public <U> ParseResult<U> mapResult(Function<T,U> mapper)
      Convert the value in this parse result (if successful) using the provided function.
    • hasResult

      public boolean hasResult()
      Returns true if the parse result was successful.
    • result

      public T result()
      Returns the result of parsing.