dnet-hadoop/dhp-pace-core/src/main/java/eu/dnetlib/pace/tree/support/AggType.java

22 lines
445 B
Java
Raw Normal View History

2023-07-06 10:28:53 +02:00
package eu.dnetlib.pace.tree.support;
import eu.dnetlib.pace.util.PaceException;
public enum AggType {
2023-07-06 10:28:53 +02:00
W_MEAN, // weighted mean
AVG, // average
SUM, MAX, MIN, AND, // used for necessary conditions
OR; // used for sufficient conditions
2023-07-06 10:28:53 +02:00
public static AggType getEnum(String value) {
2023-07-06 10:28:53 +02:00
try {
return AggType.valueOf(value);
} catch (IllegalArgumentException e) {
throw new PaceException("Undefined aggregation type", e);
}
}
}