io.deephaven.engine.primitive.function.ShortConsumer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-primitive Show documentation
Show all versions of deephaven-engine-primitive Show documentation
Primitives: Expanding upon java.util.PrimitiveIterator and java.util.function.* for {byte, char, float, short}
/*
* ---------------------------------------------------------------------------------------------------------------------
* AUTO-GENERATED CLASS - DO NOT EDIT MANUALLY - for any changes edit CharConsumer and regenerate
* ---------------------------------------------------------------------------------------------------------------------
*/
package io.deephaven.engine.primitive.function;
import org.jetbrains.annotations.NotNull;
import java.util.Objects;
/**
* Functional interface to apply an operation to a single {@code short}.
*/
@FunctionalInterface
public interface ShortConsumer {
/**
* Apply this operation to {@code value}.
*
* @param value The {@code short} to operate one
*/
void accept(short value);
/**
* Return a composed ShortConsumer that applies {@code this} operation followed by {@code after}.
*
* @param after The ShortConsumer to apply after applying {@code this}
* @return A composed ShortConsumer that applies {@code this} followed by {@code after}
*/
default ShortConsumer andThen(@NotNull final ShortConsumer after) {
Objects.requireNonNull(after);
return (final short value) -> {
accept(value);
after.accept(value);
};
}
}