Interface State.Projection

All Superinterfaces:
Function<State,Data>
Enclosing class:
State
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 State.Projection extends Function<State,Data>
Functional interface for projections that extract data from a state.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(State state)
    Extract data from a state.

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Method Details

    • apply

      Data apply(State state)
      Extract data from a state.

      Extraction means that the resulting data should either be the accumulator value of the given state, or the value associated with some key.

      Specified by:
      apply in interface Function<State,Data>
      Parameters:
      state - the state
      Returns:
      the extracted data
      Throws:
      NullPointerException - if state is null