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

shz.core.function.ShortPredicate Maven / Gradle / Ivy

There is a newer version: 2024.0.2
Show newest version
package shz.core.function;

import java.util.Objects;

@FunctionalInterface
public interface ShortPredicate {
    boolean test(short value);

    default ShortPredicate and(ShortPredicate other) {
        Objects.requireNonNull(other);
        return value -> test(value) && other.test(value);
    }

    default ShortPredicate negate() {
        return value -> !test(value);
    }

    default ShortPredicate or(ShortPredicate other) {
        Objects.requireNonNull(other);
        return value -> test(value) || other.test(value);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy