Interface ConsumerEx<T>

  • Type Parameters:
    T - the type of the input to the operation
    All Superinterfaces:
    java.util.function.Consumer<T>, com.hazelcast.security.impl.function.SecuredFunction, java.io.Serializable
    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 ConsumerEx<T>
    extends java.util.function.Consumer<T>, java.io.Serializable, com.hazelcast.security.impl.function.SecuredFunction
    Serializable variant of java.util.function.Consumer which declares checked exception.
    Since:
    4.0
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void accept​(T t)  
      void acceptEx​(T t)
      Exception-declaring version of Consumer.accept(T)
      default ConsumerEx<T> andThen​(ConsumerEx<? super T> after)
      Serializable variant of java.util.function.Consumer#andThen(Consumer).
      static <T> ConsumerEx<T> noop()
      Returns a consumer that does nothing.
      • Methods inherited from interface java.util.function.Consumer

        andThen
      • Methods inherited from interface com.hazelcast.security.impl.function.SecuredFunction

        permissions
    • Method Detail

      • acceptEx

        void acceptEx​(T t)
               throws java.lang.Exception
        Exception-declaring version of Consumer.accept(T)
        Throws:
        java.lang.Exception - in case of any exceptional case
      • accept

        default void accept​(T t)
        Specified by:
        accept in interface java.util.function.Consumer<T>
      • andThen

        default ConsumerEx<T> andThen​(ConsumerEx<? super T> after)
        Serializable variant of java.util.function.Consumer#andThen(Consumer).
      • noop

        static <T> ConsumerEx<T> noop()
        Returns a consumer that does nothing.
        Type Parameters:
        T - the consumer input type