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

java.util.function.Predicate Maven / Gradle / Ivy

Go to download

JVM AOT compiler currently generating JavaScript, C++, Haxe, with initial focus on Kotlin and games.

There is a newer version: 0.6.8
Show newest version
package java.util.function;

import java.util.Objects;

@FunctionalInterface
public interface Predicate {
	boolean test(T t);

	default Predicate and(Predicate that) {
		return null;
	}
	default Predicate negate() {
		return null;
	}
	default Predicate or(Predicate that) {
		return null;
	}
	static  Predicate isEqual(Object targetRef) {
		return null;
	}

	/*
	default Predicate and(Predicate that) {
		Objects.requireNonNull(that);
		return (t) -> test(t) && that.test(t);
	}
	default Predicate negate() {
		return (t) -> !test(t);
	}
	default Predicate or(Predicate that) {
		Objects.requireNonNull(that);
		return (t) -> test(t) || that.test(t);
	}
	static  Predicate isEqual(Object targetRef) {
		return (targetRef != null) ? object -> targetRef.equals(object) : Objects::isNull;
	}
	*/
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy