All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kiwiproject.util.function.KiwiConsumers Maven / Gradle / Ivy

Go to download

Kiwi is a utility library. We really like Google's Guava, and also use Apache Commons. But if they don't have something we need, and we think it is useful, this is where we put it.

There is a newer version: 4.5.2
Show newest version
package org.kiwiproject.util.function;

import lombok.experimental.UtilityClass;

import java.util.function.Consumer;

/**
 * Contains helper methods for {@link Consumer}.
 */
@UtilityClass
public class KiwiConsumers {

    /**
     * Provides a type-consistent, no-op {@link Consumer}.
     *
     * @param  type parameter of the Consumer
     * @return the no-op Consumer
     */
    public static  Consumer noOp() {
        return argument -> {
            // no-op
        };
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy