// 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.ws.jaxrpc.jbws775;


import java.util.HashMap;

public class TQuoteStatus {
    private java.lang.String value;
    private static java.util.Map valueMap = new HashMap();
    public static final java.lang.String _noneString = "none";
    public static final java.lang.String _receivedString = "received";
    public static final java.lang.String _processingString = "processing";
    public static final java.lang.String _completedString = "completed";
    
    public static final java.lang.String _none = new java.lang.String(_noneString);
    public static final java.lang.String _received = new java.lang.String(_receivedString);
    public static final java.lang.String _processing = new java.lang.String(_processingString);
    public static final java.lang.String _completed = new java.lang.String(_completedString);
    
    public static final TQuoteStatus none = new TQuoteStatus(_none);
    public static final TQuoteStatus received = new TQuoteStatus(_received);
    public static final TQuoteStatus processing = new TQuoteStatus(_processing);
    public static final TQuoteStatus completed = new TQuoteStatus(_completed);
    
    protected TQuoteStatus(java.lang.String value) {
        this.value = value;
        valueMap.put(this.toString(), this);
    }
    
    public java.lang.String getValue() {
        return value;
    }
    
    public static TQuoteStatus fromValue(java.lang.String value)
        throws java.lang.IllegalStateException {
        if (none.value.equals(value)) {
            return none;
        } else if (received.value.equals(value)) {
            return received;
        } else if (processing.value.equals(value)) {
            return processing;
        } else if (completed.value.equals(value)) {
            return completed;
        }
        throw new java.lang.IllegalArgumentException();
    }
    
    public static TQuoteStatus fromString(java.lang.String value)
        throws java.lang.IllegalStateException {
        TQuoteStatus ret = (TQuoteStatus)valueMap.get(value);
        if (ret != null) {
            return ret;
        }
        if (value.equals(_noneString)) {
            return none;
        } else if (value.equals(_receivedString)) {
            return received;
        } else if (value.equals(_processingString)) {
            return processing;
        } else if (value.equals(_completedString)) {
            return completed;
        }
        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 TQuoteStatus)) {
            return false;
        }
        return ((TQuoteStatus)obj).value.equals(value);
    }
    
    public int hashCode() {
        return value.hashCode();
    }
}
