Package org.apache.calcite.util
Interface Puffin.Builder<G,F>
- Type Parameters:
G- Type of state that is created when we start processingF- Type of state that is created when we start processing a file
- Enclosing class:
Puffin
public static interface Puffin.Builder<G,F>
Fluent interface for constructing a Program.
-
Method Summary
Modifier and TypeMethodDescriptionadd(Predicate<Puffin.Line<G, F>> linePredicate, Consumer<Puffin.Line<G, F>> action) Adds a predicate and action to be invoked on each line of a source.after(Consumer<Puffin.Context<G, F>> action) Adds an action to be called after all sources.afterSource(Consumer<Puffin.Context<G, F>> action) Adds an action to be called after each source.before(Consumer<Puffin.Context<G, F>> action) Adds an action to be called before all sources.beforeSource(Consumer<Puffin.Context<G, F>> action) Adds an action to be called before each source.build()Builds the program.
-
Method Details
-
add
Puffin.Builder<G,F> add(Predicate<Puffin.Line<G, F>> linePredicate, Consumer<Puffin.Line<G, F>> action) Adds a predicate and action to be invoked on each line of a source. -
beforeSource
Adds an action to be called before each source. -
afterSource
Adds an action to be called after each source. -
before
Adds an action to be called before all sources. -
after
Adds an action to be called after all sources. -
build
Puffin.Program<G> build()Builds the program.
-