com.commercehub.gradle.plugin.avro.Enums Maven / Gradle / Ivy
package com.commercehub.gradle.plugin.avro;
import java.util.Arrays;
class Enums {
static T parseCaseInsensitive(String label, T[] values, String input) {
for (T value : values) {
if (value.name().equalsIgnoreCase(input)) {
return value;
}
}
throw new IllegalArgumentException(String.format("Invalid %s '%s'. Value values are: %s",
label, input, Arrays.asList(values)));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy