Class ConsumerThatAffects<T>

  • All Implemented Interfaces:
    Quality<java.util.function.Consumer<T>>

    public final class ConsumerThatAffects<T>
    extends java.lang.Object
    implements Quality<java.util.function.Consumer<T>>
    • Constructor Detail

      • ConsumerThatAffects

        public ConsumerThatAffects​(Description valueDescription,
                                   java.util.function.Supplier<T> valueSupplier,
                                   Quality<? super T> valueQuality)
        A Quality that describes the side effect of a Consumer on its argument.

        The argument is provided by the given Supplier and tested by the given Quality after passing it to the consumer.

        For best results, decorate the valueQuality with SoIt or Core.soIt(Quality).

      • ConsumerThatAffects

        public ConsumerThatAffects​(java.util.function.Supplier<T> valueSupplier,
                                   Quality<? super T> valueQuality)
        A Quality that describes the side effect of a Consumer on its argument.

        The argument is provided by the given Supplier and tested by the given Quality after passing it to the consumer.

        For best results, decorate the valueQuality with SoIt or Core.soIt(Quality).