//This class was generated by the JAXRPC SI, do not edit.
//Contents subject to change without notice.
//JAX-RPC Standard Implementation (1.1.2_01, build R40)

/*
  * JBoss, Home of Professional Open Source
  * Copyright 2005, JBoss Inc., and individual contributors as indicated
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as
  * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
package org.jboss.test.ws.tools.jbws_204.wscompile.simpletypes;


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

public class USMidwest {
 private java.lang.String value;
 private static Map valueMap = new HashMap();
 public static final String _INString = "IN";
 public static final String _ILString = "IL";
 public static final String _OHString = "OH";

 public static final java.lang.String _IN = new java.lang.String(_INString);
 public static final java.lang.String _IL = new java.lang.String(_ILString);
 public static final java.lang.String _OH = new java.lang.String(_OHString);

 public static final USMidwest IN = new USMidwest(_IN);
 public static final USMidwest IL = new USMidwest(_IL);
 public static final USMidwest OH = new USMidwest(_OH);
 
 protected USMidwest(java.lang.String value) {
     this.value = value;
     valueMap.put(this.toString(), this);
 }

 public java.lang.String getValue() {
     return value;
 }

 public static USMidwest fromValue(java.lang.String value)
     throws java.lang.IllegalStateException {
     if (IN.value.equals(value)) {
         return IN;
     } else if (IL.value.equals(value)) {
         return IL;
     } else if (OH.value.equals(value)) {
         return OH;
     }
     throw new IllegalArgumentException();
 }

 public static USMidwest fromString(String value)
     throws java.lang.IllegalStateException {
     USMidwest ret = (USMidwest)valueMap.get(value);
     if (ret != null) {
         return ret;
     }
     if (value.equals(_INString)) {
         return IN;
     } else if (value.equals(_ILString)) {
         return IL;
     } else if (value.equals(_OHString)) {
         return OH;
     }
     throw new IllegalArgumentException();
 }

 public String toString() {
     return value.toString();
 }

 private Object readResolve()
     throws java.io.ObjectStreamException {
     return fromValue(getValue());
 }

 public boolean equals(Object obj) {
     if (!(obj instanceof USMidwest)) {
         return false;
     }
     return ((USMidwest)obj).value.equals(value);
 }

 public int hashCode() {
     return value.hashCode();
 }
}