net.amygdalum.util.builders.Predicates Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compilerutils Show documentation
Show all versions of compilerutils Show documentation
Utility classes needed for search and compiler applications
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