01: // This class was generated by the JAXRPC SI, do not edit.
02: // Contents subject to change without notice.
03: // JAX-RPC Standard Implementation (1.1.3, build R1)
04: // Generated source version: 1.1.3
05:
06: package org.jboss.test.wsrp.core;
07:
08: import java.util.HashMap;
09: import java.io.Serializable;
10:
11: public class CookieProtocol implements Serializable {
12: /** The serialVersionUID */
13: private static final long serialVersionUID = 8319850312108124391L;
14: private java.lang.String value;
15: private static java.util.Map valueMap = new HashMap();
16: public static final java.lang.String _noneString = "none";
17: public static final java.lang.String _perUserString = "perUser";
18: public static final java.lang.String _perGroupString = "perGroup";
19:
20: public static final java.lang.String _none = new java.lang.String(
21: _noneString);
22: public static final java.lang.String _perUser = new java.lang.String(
23: _perUserString);
24: public static final java.lang.String _perGroup = new java.lang.String(
25: _perGroupString);
26:
27: public static final CookieProtocol none = new CookieProtocol(_none);
28: public static final CookieProtocol perUser = new CookieProtocol(
29: _perUser);
30: public static final CookieProtocol perGroup = new CookieProtocol(
31: _perGroup);
32:
33: protected CookieProtocol(java.lang.String value) {
34: this .value = value;
35: valueMap.put(this .toString(), this );
36: }
37:
38: public java.lang.String getValue() {
39: return value;
40: }
41:
42: public static CookieProtocol fromValue(java.lang.String value)
43: throws java.lang.IllegalStateException {
44: if (none.value.equals(value)) {
45: return none;
46: } else if (perUser.value.equals(value)) {
47: return perUser;
48: } else if (perGroup.value.equals(value)) {
49: return perGroup;
50: }
51: throw new java.lang.IllegalArgumentException();
52: }
53:
54: public static CookieProtocol fromString(java.lang.String value)
55: throws java.lang.IllegalStateException {
56: CookieProtocol ret = (CookieProtocol) valueMap.get(value);
57: if (ret != null) {
58: return ret;
59: }
60: if (value.equals(_noneString)) {
61: return none;
62: } else if (value.equals(_perUserString)) {
63: return perUser;
64: } else if (value.equals(_perGroupString)) {
65: return perGroup;
66: }
67: throw new IllegalArgumentException();
68: }
69:
70: public java.lang.String toString() {
71: return value.toString();
72: }
73:
74: private java.lang.Object readResolve()
75: throws java.io.ObjectStreamException {
76: return fromValue(getValue());
77: }
78:
79: public boolean equals(java.lang.Object obj) {
80: if (!(obj instanceof CookieProtocol)) {
81: return false;
82: }
83: return ((CookieProtocol) obj).value.equals(value);
84: }
85:
86: public int hashCode() {
87: return value.hashCode();
88: }
89: }
|