com.almondtools.util.collections.Predicates Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rexlex Show documentation
Show all versions of rexlex Show documentation
Regular expression matchers, searcher, lexers based on deterministic finite automata
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