Interface Effect<A>

  • Type Parameters:
    A - the type that this Effect takes as input
    All Superinterfaces:
    java.util.function.Consumer<A>
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @Deprecated
    @FunctionalInterface
    public interface Effect<A>
    extends java.util.function.Consumer<A>
    Deprecated.
    in favour of Consumer
    A thing that performs a side-effect.
    Since:
    1.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  Effect.Applicant<A>
      Deprecated.
      in favour of Iterable
    • Method Detail

      • apply

        void apply​(A a)
        Deprecated.
        Perform the side-effect.
        Parameters:
        a - the input to use for performing the effect.
      • accept

        default void accept​(A a)
        Deprecated.
        Adapt to the Java 8 interface.
        Specified by:
        accept in interface java.util.function.Consumer<A>
        Parameters:
        a - the input to use for performing the effect.
        Since:
        3.0