Interface PegSolver<S,I,R>

Type Parameters:
S - Raw data type
I - Qualified data type
R - Result type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PegSolver<S,I,R>
Generic interface for a solver that uses a function to transform raw data into a qualified value and then returns a result.
Author:
skerdudou
  • Method Details

    • apply

      Throws:
      PegParsingValueException
    • flattenSolvers

      static <S, I, I2, R> PegSolver<S,I,R> flattenSolvers(PegSolver<PegSolver<S,I,I2>,I2,R> nestedSolver)
      Forward the PegSolverFunction to the nested solver and return the PegSolver resolving both levels.
      Type Parameters:
      S - Raw data type
      I - Qualified data type
      I2 - Nested qualified data type
      R - Result type
      Parameters:
      nestedSolver - the nested solver
      Returns:
      the solver that resolve both levels