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

com.almondtools.util.collections.Predicates Maven / Gradle / Ivy

Go to download

Regular expression matchers, searcher, lexers based on deterministic finite automata

There is a newer version: 0.3.3
Show newest version
package com.almondtools.util.collections;


public 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