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

net.amygdalum.util.builders.Predicates Maven / Gradle / Ivy

The newest version!
package net.amygdalum.util.builders;


public final class Predicates {

	public static  Predicate all(final Class clazz) {
		return new Predicate() {

			@Override
			public boolean evaluate(T object) {
				if (clazz.isInstance(object)) {
					return true;
				} else {
					return false;
				}
			}
			
		};
	}

	public static  Predicate notNull() {
		return new Predicate() {

			@Override
			public boolean evaluate(T object) {
				return object != null;
			}
			
		};
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy