Interface Setup<C,S>

Type Parameters:
C - The underlying target container type.
S - The setup type: the intended effective type of the concrete builder implementation.
All Known Implementing Classes:
Charger, DataBuilder, LateBuilder, ProtoBuilder
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 Setup<C,S>
Defines a generic interface for a uniform, basic implementation of a typical builder pattern. It assumes that the information to be gathered during the build process should be collected in a target container instance attached to or created by the builder.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <A> S
    forEach(Streamable<A> arguments, BiFunction<? super S,? super A,S> setupMethod)
    Performs a given setupMethod for each argument provided by the given Streamable and return the setup instance itself.
    setup(Consumer<? super C> consumer)
    Accepts a Consumer as modifying operation to be performed on a target container instance immediately or no later than the final build() operation and returns the setup instance itself.
  • Method Details

    • setup

      S setup(Consumer<? super C> consumer)
      Accepts a Consumer as modifying operation to be performed on a target container instance immediately or no later than the final build() operation and returns the setup instance itself.
    • forEach

      default <A> S forEach(Streamable<A> arguments, BiFunction<? super S,? super A,S> setupMethod)
      Performs a given setupMethod for each argument provided by the given Streamable and return the setup instance itself.
      Type Parameters:
      A - The argument type.