
package de.christofreichardt.jaxws.securitypriceservice;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;


/**
 * <p>Java class for Exercise.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * <p>
 * <pre>
 * &lt;simpleType name="Exercise">
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     &lt;enumeration value="european"/>
 *     &lt;enumeration value="american"/>
 *   &lt;/restriction>
 * &lt;/simpleType>
 * </pre>
 * 
 */
@XmlType(name = "Exercise")
@XmlEnum
public enum Exercise {

    @XmlEnumValue("european")
    EUROPEAN("european"),
    @XmlEnumValue("american")
    AMERICAN("american");
    private final String value;

    Exercise(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

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

}
