![JAR search and dependency download from the Maven repository](/logo.png)
no.motif.NOP Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of motif Show documentation
Show all versions of motif Show documentation
A library helping you to compose behavior from smaller parts.
The newest version!
package no.motif;
import no.motif.f.Do;
import no.motif.f.Fn;
/**
* A few no-operation implementations.
*/
public final class NOP {
/**
* A {@link Runnable} which does nothing and its {@link Runnable#run() run}-method
* immediately returns.
*/
public static final Runnable runnable = new Runnable() { @Override public void run() { }};
/**
* The NOP for {@link Fn} simply yields any given argument as its result.
*/
@SuppressWarnings("unchecked")
public static Fn fn() { return (Fn) fn; }
/**
* The NOP for {@link Do} does nothing.
*/
public static final Do
© 2015 - 2025 Weber Informatics LLC | Privacy Policy