Interface Reducer.Constructor1<D,A1,R>

Type Parameters:
D - the type of source document identifiers
A1 - the type of the (first) parsed argument value
R - the type of resulting AST nodes
All Superinterfaces:
Reducer.Constructor
All Known Subinterfaces:
Reducer.Collector1<D,A1>
Enclosing class:
Reducer
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 static interface Reducer.Constructor1<D,A1,R> extends Reducer.Constructor
Functional interface for AST node constructors with one parsed argument.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Reducer.Context<D> context, A1 val1)
    Creates a new AST node with one parsed argument.
    default <T> Parser<D,T>
    parse(Fragment<D,T,? extends A1> arg1)
     
  • Method Details

    • parse

      default <T> Parser<D,T> parse(Fragment<D,T,? extends A1> arg1)
    • apply

      R apply(Reducer.Context<D> context, A1 val1) throws Reducer.Abort
      Creates a new AST node with one parsed argument.
      Parameters:
      context - the context of reduction
      val1 - the (first) parsed argument value
      Returns:
      a new AST node
      Throws:
      Reducer.Abort - if a semantic error has been detected