// This class was generated by the JAXRPC SI, do not edit.
// Contents subject to change without notice.
// JAX-RPC Standard Implementation (1.1.3, build R1)
// Generated source version: 1.1.3

package org.jboss.test.webservice.jbws718;


import java.util.Map;
import java.util.HashMap;

public class ParameterTypeEnum {
    private java.lang.String value;
    private static java.util.Map valueMap = new HashMap();
    public static final java.lang.String _BooleanString = "Boolean";
    public static final java.lang.String _DateTimeString = "DateTime";
    public static final java.lang.String _IntegerString = "Integer";
    public static final java.lang.String _FloatString = "Float";
    public static final java.lang.String _StringString = "String";
    
    public static final java.lang.String _Boolean = new java.lang.String(_BooleanString);
    public static final java.lang.String _DateTime = new java.lang.String(_DateTimeString);
    public static final java.lang.String _Integer = new java.lang.String(_IntegerString);
    public static final java.lang.String _Float = new java.lang.String(_FloatString);
    public static final java.lang.String _String = new java.lang.String(_StringString);
    
    public static final ParameterTypeEnum Boolean = new ParameterTypeEnum(_Boolean);
    public static final ParameterTypeEnum DateTime = new ParameterTypeEnum(_DateTime);
    public static final ParameterTypeEnum Integer = new ParameterTypeEnum(_Integer);
    public static final ParameterTypeEnum Float = new ParameterTypeEnum(_Float);
    public static final ParameterTypeEnum String = new ParameterTypeEnum(_String);
    
    protected ParameterTypeEnum(java.lang.String value) {
        this.value = value;
        valueMap.put(this.toString(), this);
    }
    
    public java.lang.String getValue() {
        return value;
    }
    
    public static ParameterTypeEnum fromValue(java.lang.String value)
        throws java.lang.IllegalStateException {
        if (Boolean.value.equals(value)) {
            return Boolean;
        } else if (DateTime.value.equals(value)) {
            return DateTime;
        } else if (Integer.value.equals(value)) {
            return Integer;
        } else if (Float.value.equals(value)) {
            return Float;
        } else if (String.value.equals(value)) {
            return String;
        }
        throw new java.lang.IllegalArgumentException();
    }
    
    public static ParameterTypeEnum fromString(java.lang.String value)
        throws java.lang.IllegalStateException {
        ParameterTypeEnum ret = (ParameterTypeEnum)valueMap.get(value);
        if (ret != null) {
            return ret;
        }
        if (value.equals(_BooleanString)) {
            return Boolean;
        } else if (value.equals(_DateTimeString)) {
            return DateTime;
        } else if (value.equals(_IntegerString)) {
            return Integer;
        } else if (value.equals(_FloatString)) {
            return Float;
        } else if (value.equals(_StringString)) {
            return String;
        }
        throw new IllegalArgumentException();
    }
    
    public java.lang.String toString() {
        return value.toString();
    }
    
    private java.lang.Object readResolve()
        throws java.io.ObjectStreamException {
        return fromValue(getValue());
    }
    
    public boolean equals(java.lang.Object obj) {
        if (!(obj instanceof ParameterTypeEnum)) {
            return false;
        }
        return ((ParameterTypeEnum)obj).value.equals(value);
    }
    
    public int hashCode() {
        return value.hashCode();
    }
}
