00001 // ********************************************************************** 00002 // 00003 // Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved. 00004 // 00005 // This copy of Ice is licensed to you under the terms described in the 00006 // ICE_LICENSE file included in this distribution. 00007 // 00008 // ********************************************************************** 00009 00010 // Ice version 3.4.1 00011 00012 package cast.cdl; 00013 00014 // <auto-generated> 00015 // 00016 // Generated from file `CDL.ice' 00017 // 00018 // Warning: do not edit this file. 00019 // 00020 // </auto-generated> 00021 00022 00023 public class WorkingMemoryChange implements java.lang.Cloneable, java.io.Serializable 00024 { 00025 public WorkingMemoryOperation operation; 00026 00027 public String src; 00028 00029 public WorkingMemoryAddress address; 00030 00031 public String type; 00032 00033 public String[] superTypes; 00034 00035 public CASTTime timestamp; 00036 00037 public WorkingMemoryChange() 00038 { 00039 } 00040 00041 public WorkingMemoryChange(WorkingMemoryOperation operation, String src, WorkingMemoryAddress address, String type, String[] superTypes, CASTTime timestamp) 00042 { 00043 this.operation = operation; 00044 this.src = src; 00045 this.address = address; 00046 this.type = type; 00047 this.superTypes = superTypes; 00048 this.timestamp = timestamp; 00049 } 00050 00051 public boolean 00052 equals(java.lang.Object rhs) 00053 { 00054 if(this == rhs) 00055 { 00056 return true; 00057 } 00058 WorkingMemoryChange _r = null; 00059 try 00060 { 00061 _r = (WorkingMemoryChange)rhs; 00062 } 00063 catch(ClassCastException ex) 00064 { 00065 } 00066 00067 if(_r != null) 00068 { 00069 if(operation != _r.operation) 00070 { 00071 if(operation == null || _r.operation == null || !operation.equals(_r.operation)) 00072 { 00073 return false; 00074 } 00075 } 00076 if(src != _r.src) 00077 { 00078 if(src == null || _r.src == null || !src.equals(_r.src)) 00079 { 00080 return false; 00081 } 00082 } 00083 if(address != _r.address) 00084 { 00085 if(address == null || _r.address == null || !address.equals(_r.address)) 00086 { 00087 return false; 00088 } 00089 } 00090 if(type != _r.type) 00091 { 00092 if(type == null || _r.type == null || !type.equals(_r.type)) 00093 { 00094 return false; 00095 } 00096 } 00097 if(!java.util.Arrays.equals(superTypes, _r.superTypes)) 00098 { 00099 return false; 00100 } 00101 if(timestamp != _r.timestamp) 00102 { 00103 if(timestamp == null || _r.timestamp == null || !timestamp.equals(_r.timestamp)) 00104 { 00105 return false; 00106 } 00107 } 00108 00109 return true; 00110 } 00111 00112 return false; 00113 } 00114 00115 public int 00116 hashCode() 00117 { 00118 int __h = 0; 00119 if(operation != null) 00120 { 00121 __h = 5 * __h + operation.hashCode(); 00122 } 00123 if(src != null) 00124 { 00125 __h = 5 * __h + src.hashCode(); 00126 } 00127 if(address != null) 00128 { 00129 __h = 5 * __h + address.hashCode(); 00130 } 00131 if(type != null) 00132 { 00133 __h = 5 * __h + type.hashCode(); 00134 } 00135 if(superTypes != null) 00136 { 00137 for(int __i0 = 0; __i0 < superTypes.length; __i0++) 00138 { 00139 if(superTypes[__i0] != null) 00140 { 00141 __h = 5 * __h + superTypes[__i0].hashCode(); 00142 } 00143 } 00144 } 00145 if(timestamp != null) 00146 { 00147 __h = 5 * __h + timestamp.hashCode(); 00148 } 00149 return __h; 00150 } 00151 00152 public java.lang.Object 00153 clone() 00154 { 00155 java.lang.Object o = null; 00156 try 00157 { 00158 o = super.clone(); 00159 } 00160 catch(CloneNotSupportedException ex) 00161 { 00162 assert false; // impossible 00163 } 00164 return o; 00165 } 00166 00167 public void 00168 __write(IceInternal.BasicStream __os) 00169 { 00170 operation.__write(__os); 00171 __os.writeString(src); 00172 address.__write(__os); 00173 __os.writeString(type); 00174 StringSeqHelper.write(__os, superTypes); 00175 timestamp.__write(__os); 00176 } 00177 00178 public void 00179 __read(IceInternal.BasicStream __is) 00180 { 00181 operation = WorkingMemoryOperation.__read(__is); 00182 src = __is.readString(); 00183 address = new WorkingMemoryAddress(); 00184 address.__read(__is); 00185 type = __is.readString(); 00186 superTypes = StringSeqHelper.read(__is); 00187 timestamp = new CASTTime(); 00188 timestamp.__read(__is); 00189 } 00190 00191 public void 00192 ice_write(Ice.OutputStream __outS) 00193 { 00194 operation.ice_write(__outS); 00195 __outS.writeString(src); 00196 address.ice_write(__outS); 00197 __outS.writeString(type); 00198 StringSeqHelper.write(__outS, superTypes); 00199 timestamp.ice_write(__outS); 00200 } 00201 00202 public void 00203 ice_read(Ice.InputStream __inS) 00204 { 00205 operation = WorkingMemoryOperation.ice_read(__inS); 00206 src = __inS.readString(); 00207 address = new WorkingMemoryAddress(); 00208 address.ice_read(__inS); 00209 type = __inS.readString(); 00210 superTypes = StringSeqHelper.read(__inS); 00211 timestamp = new CASTTime(); 00212 timestamp.ice_read(__inS); 00213 } 00214 }
1.5.8