minecraft-src/net/minecraft/CharPredicate.java
2025-07-04 01:41:11 +03:00

22 lines
484 B
Java

package net.minecraft;
import java.util.Objects;
@FunctionalInterface
public interface CharPredicate {
boolean test(char c);
default CharPredicate and(CharPredicate predicate) {
Objects.requireNonNull(predicate);
return c -> this.test(c) && predicate.test(c);
}
default CharPredicate negate() {
return c -> !this.test(c);
}
default CharPredicate or(CharPredicate predicate) {
Objects.requireNonNull(predicate);
return c -> this.test(c) || predicate.test(c);
}
}