org.dmg.pmml.MathContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pmml-model-gwt Show documentation
Show all versions of pmml-model-gwt Show documentation
JPMML GWT compatible class model
package org.dmg.pmml;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.xml.bind.annotation.XmlEnum;
import jakarta.xml.bind.annotation.XmlEnumValue;
import jakarta.xml.bind.annotation.XmlType;
@XmlType(name = "MATH-CONTEXT", namespace = "http://www.dmg.org/PMML-4_4")
@XmlEnum
public enum MathContext
implements StringValue
{
@XmlEnumValue("float")
@JsonProperty("float")
FLOAT("float"),
@XmlEnumValue("double")
@JsonProperty("double")
DOUBLE("double");
private final String value;
MathContext(String v) {
value = v;
}
@Override
public String value() {
return value;
}
public static MathContext fromValue(String v) {
for (MathContext c: MathContext.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
@Override
public String toString() {
return value();
}
}