1 7 8 package com.capeclear.www.GlobalWeather_xsd; 9 10 import java.io.Serializable; 11 import java.util.HashMap; 12 import java.io.ObjectStreamException; 13 14 public class VisibilityQualifier implements Serializable { 15 private String _value_; 16 private static HashMap _table_ = new HashMap(); 17 18 protected VisibilityQualifier(String value) { 20 _value_ = value; 21 _table_.put(_value_,this); 22 } 23 24 public static final String _AT = "AT"; 25 public static final String _BEYOND = "BEYOND"; 26 public static final String _BELOW = "BELOW"; 27 public static final VisibilityQualifier AT = new VisibilityQualifier(_AT); 28 public static final VisibilityQualifier BEYOND = new VisibilityQualifier(_BEYOND); 29 public static final VisibilityQualifier BELOW = new VisibilityQualifier(_BELOW); 30 public String getValue() { return _value_;} 31 public static VisibilityQualifier fromValue(String value) 32 throws IllegalStateException { 33 VisibilityQualifier enum = (VisibilityQualifier) 34 _table_.get(value); 35 if (enum==null) throw new IllegalStateException(); 36 return enum; 37 } 38 public static VisibilityQualifier fromString(String value) 39 throws IllegalStateException { 40 return fromValue(value); 41 } 42 public boolean equals(Object obj) {return (obj == this);} 43 public int hashCode() { return toString().hashCode();} 44 public String toString() { return _value_;} 45 public Object readResolve() throws ObjectStreamException { return fromValue(_value_);} 46 } 47 | Popular Tags |