All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dmg.pmml.CompareFunction Maven / Gradle / Ivy

There is a newer version: 1.6.5
Show newest version

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 = "COMPARE-FUNCTION", namespace = "http://www.dmg.org/PMML-4_4")
@XmlEnum
public enum CompareFunction
    implements StringValue
{

    @XmlEnumValue("absDiff")
    @JsonProperty("absDiff")
    ABS_DIFF("absDiff"),
    @XmlEnumValue("gaussSim")
    @JsonProperty("gaussSim")
    GAUSS_SIM("gaussSim"),
    @XmlEnumValue("delta")
    @JsonProperty("delta")
    DELTA("delta"),
    @XmlEnumValue("equal")
    @JsonProperty("equal")
    EQUAL("equal"),
    @XmlEnumValue("table")
    @JsonProperty("table")
    TABLE("table");
    private final String value;

    CompareFunction(String v) {
        value = v;
    }

    @Override
    public String value() {
        return value;
    }

    public static CompareFunction fromValue(String v) {
        for (CompareFunction c: CompareFunction.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

    @Override
    public String toString() {
        return value();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy