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 StateChange implements Serializable {
12: /** The serialVersionUID */
13: private static final long serialVersionUID = 6137129200281947012L;
14: private java.lang.String value;
15: private static java.util.Map valueMap = new HashMap();
16: public static final java.lang.String _readWriteString = "readWrite";
17: public static final java.lang.String _cloneBeforeWriteString = "cloneBeforeWrite";
18: public static final java.lang.String _readOnlyString = "readOnly";
19:
20: public static final java.lang.String _readWrite = new java.lang.String(
21: _readWriteString);
22: public static final java.lang.String _cloneBeforeWrite = new java.lang.String(
23: _cloneBeforeWriteString);
24: public static final java.lang.String _readOnly = new java.lang.String(
25: _readOnlyString);
26:
27: public static final StateChange readWrite = new StateChange(
28: _readWrite);
29: public static final StateChange cloneBeforeWrite = new StateChange(
30: _cloneBeforeWrite);
31: public static final StateChange readOnly = new StateChange(
32: _readOnly);
33:
34: protected StateChange(java.lang.String value) {
35: this .value = value;
36: valueMap.put(this .toString(), this );
37: }
38:
39: public java.lang.String getValue() {
40: return value;
41: }
42:
43: public static StateChange fromValue(java.lang.String value)
44: throws java.lang.IllegalStateException {
45: if (readWrite.value.equals(value)) {
46: return readWrite;
47: } else if (cloneBeforeWrite.value.equals(value)) {
48: return cloneBeforeWrite;
49: } else if (readOnly.value.equals(value)) {
50: return readOnly;
51: }
52: throw new java.lang.IllegalArgumentException();
53: }
54:
55: public static StateChange fromString(java.lang.String value)
56: throws java.lang.IllegalStateException {
57: StateChange ret = (StateChange) valueMap.get(value);
58: if (ret != null) {
59: return ret;
60: }
61: if (value.equals(_readWriteString)) {
62: return readWrite;
63: } else if (value.equals(_cloneBeforeWriteString)) {
64: return cloneBeforeWrite;
65: } else if (value.equals(_readOnlyString)) {
66: return readOnly;
67: }
68: throw new IllegalArgumentException();
69: }
70:
71: public java.lang.String toString() {
72: return value.toString();
73: }
74:
75: private java.lang.Object readResolve()
76: throws java.io.ObjectStreamException {
77: return fromValue(getValue());
78: }
79:
80: public boolean equals(java.lang.Object obj) {
81: if (!(obj instanceof StateChange)) {
82: return false;
83: }
84: return ((StateChange) obj).value.equals(value);
85: }
86:
87: public int hashCode() {
88: return value.hashCode();
89: }
90: }
|