/**
 * Copyright (c) 2011, 2014 Eurotech and/or its affiliates
 *
 *  All rights reserved. This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License v1.0
 *  which accompanies this distribution, and is available at
 *  http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   Eurotech
 */
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2012.10.26 at 02:11:54 PM CEST 
//


package org.eclipse.kura.configuration.metatype;



/**
 * <p>Java class for Tscalar.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * <p>
 * <pre>
 * &lt;simpleType name="Tscalar">
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     &lt;enumeration value="String"/>
 *     &lt;enumeration value="Long"/>
 *     &lt;enumeration value="Double"/>
 *     &lt;enumeration value="Float"/>
 *     &lt;enumeration value="Integer"/>
 *     &lt;enumeration value="Byte"/>
 *     &lt;enumeration value="Char"/>
 *     &lt;enumeration value="Boolean"/>
 *     &lt;enumeration value="Short"/>
 *     &lt;enumeration value="Password"/>
 *   &lt;/restriction>
 * &lt;/simpleType>
 * </pre>
 * 
 */
public enum Scalar {

    STRING("String"),
    LONG("Long"),
    DOUBLE("Double"),
    FLOAT("Float"),
    INTEGER("Integer"),
    BYTE("Byte"),
    CHAR("Char"),
    BOOLEAN("Boolean"),
    SHORT("Short"),
    PASSWORD("Password");
    private final String value;

    Scalar(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

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

}
