org.bklab.flow.util.function.EmptyFunctions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-vaadin-flow Show documentation
Show all versions of fluent-vaadin-flow Show documentation
Broderick Labs for fluent vaadin flow. Inherits common Vaadin components.
package org.bklab.flow.util.function;
import java.util.function.*;
@SuppressWarnings({"unchecked", "rawtypes"})
public class EmptyFunctions {
private static final Consumer EMPTY_CONSUMER = a -> {
};
private static final Function EMPTY_FUNCTION = a -> a;
private static final Supplier EMPTY_SUPPLIER = () -> null;
private static final BiConsumer EMPTY_BI_CONSUMER = (a, b) -> {
};
private static final BiFunction FIRST_BI_FUNCTION = (a, b) -> a;
private static final BiFunction LAST_BI_FUNCTION = (a, b) -> b;
public static Consumer emptyConsumer() {
return (Consumer) EMPTY_CONSUMER;
}
public static Function emptyFunction() {
return (Function) EMPTY_FUNCTION;
}
public static Supplier emptySupplier() {
return (Supplier) EMPTY_SUPPLIER;
}
public static BiConsumer emptyBiConsumer() {
return (BiConsumer) EMPTY_BI_CONSUMER;
}
public static BiFunction firstBiFunction() {
return (BiFunction) FIRST_BI_FUNCTION;
}
public static BiFunction lastBiFunction() {
return (BiFunction) LAST_BI_FUNCTION;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy