1 7 8 package com.capeclear.www.GlobalWeather_xsd; 9 10 import java.io.ObjectStreamException; 11 import java.io.Serializable; 12 import java.util.HashMap; 13 14 public class DirectionCompass implements Serializable { 15 private String _value_; 16 private static HashMap _table_ = new HashMap(); 17 18 protected DirectionCompass(String value) { 20 _value_ = value; 21 _table_.put(_value_,this); 22 } 23 24 public static final String _N = "N"; 25 public static final String _NNE = "NNE"; 26 public static final String _NE = "NE"; 27 public static final String _ENE = "ENE"; 28 public static final String _E = "E"; 29 public static final String _ESE = "ESE"; 30 public static final String _SE = "SE"; 31 public static final String _SSE = "SSE"; 32 public static final String _S = "S"; 33 public static final String _SSW = "SSW"; 34 public static final String _SW = "SW"; 35 public static final String _WSW = "WSW"; 36 public static final String _W = "W"; 37 public static final String _WNW = "WNW"; 38 public static final String _NW = "NW"; 39 public static final String _NNW = "NNW"; 40 public static final DirectionCompass N = new DirectionCompass(_N); 41 public static final DirectionCompass NNE = new DirectionCompass(_NNE); 42 public static final DirectionCompass NE = new DirectionCompass(_NE); 43 public static final DirectionCompass ENE = new DirectionCompass(_ENE); 44 public static final DirectionCompass E = new DirectionCompass(_E); 45 public static final DirectionCompass ESE = new DirectionCompass(_ESE); 46 public static final DirectionCompass SE = new DirectionCompass(_SE); 47 public static final DirectionCompass SSE = new DirectionCompass(_SSE); 48 public static final DirectionCompass S = new DirectionCompass(_S); 49 public static final DirectionCompass SSW = new DirectionCompass(_SSW); 50 public static final DirectionCompass SW = new DirectionCompass(_SW); 51 public static final DirectionCompass WSW = new DirectionCompass(_WSW); 52 public static final DirectionCompass W = new DirectionCompass(_W); 53 public static final DirectionCompass WNW = new DirectionCompass(_WNW); 54 public static final DirectionCompass NW = new DirectionCompass(_NW); 55 public static final DirectionCompass NNW = new DirectionCompass(_NNW); 56 public String getValue() { return _value_;} 57 public static DirectionCompass fromValue(String value) 58 throws java.lang.IllegalStateException { 59 DirectionCompass enum = (DirectionCompass) 60 _table_.get(value); 61 if (enum==null) throw new IllegalStateException(); 62 return enum; 63 } 64 public static DirectionCompass fromString(String value) 65 throws IllegalStateException { 66 return fromValue(value); 67 } 68 public boolean equals(java.lang.Object obj) {return (obj == this);} 69 public int hashCode() { return toString().hashCode();} 70 public String toString() { return _value_;} 71 public Object readResolve() throws ObjectStreamException { return fromValue(_value_);} 72 } 73 | Popular Tags |