Class ParseResult<T>

    • Method Detail

      • 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.