Interface VoidFunction0

  • 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 VoidFunction0
    A FunctionalInterface that takes no parameters and has no return but is allowed to throw exceptions.
    The point is to be able to use in Try, Future clauses where one doesn't have an explicit return type.
    One can then use this interface to perform the side-effecting function and then automatically have Unit returned
    Since:
    1.9
    • Method Detail

      • apply

        void apply()
            throws java.lang.Throwable
        Applies this function.
        Throws:
        java.lang.Throwable - Any error that may occur when applying the function
        Since:
        1.9