com.wavefront.predicates.PredicateMatchOp Maven / Gradle / Ivy
The newest version!
package com.wavefront.predicates;
/**
* Aggregation method for predicate matchers. Translates to allMatch(), anyMatch(), noneMatch().
*
* @author [email protected].
*/
enum PredicateMatchOp {
ALL, ANY, NONE;
static PredicateMatchOp fromString(String input) {
for (PredicateMatchOp match : PredicateMatchOp.values()) {
if (match.name().equalsIgnoreCase(input)) {
return match;
}
}
throw new IllegalArgumentException(input + " is not a valid match!");
}
}