- }\r
-\r
- /**\r
- * Returns the value of field 'name'.\r
- * \r
- * @return the value of field 'Name'.\r
- */\r
- public java.lang.String getName(\r
- ) {\r
- return this._name;\r
- }\r
-\r
- /**\r
- * Method getObjRef.\r
- * \r
- * @param index\r
- * @throws java.lang.IndexOutOfBoundsException if the index\r
- * given is outside the bounds of the collection\r
- * @return the value of the java.lang.Object at the given index\r
- */\r
- public java.lang.Object getObjRef(\r
- final int index)\r
- throws java.lang.IndexOutOfBoundsException {\r
- // check bounds for index\r
- if (index < 0 || index >= this._objRef.size()) {\r
- throw new IndexOutOfBoundsException("getObjRef: Index value '" + index + "' not in range [0.." + (this._objRef.size() - 1) + "]");\r
- }\r
- \r
- return _objRef.get(index);\r
- }\r
-\r
- /**\r
- * Method getObjRef.Returns the contents of the collection in\r
- * an Array. <p>Note: Just in case the collection contents\r
- * are changing in another thread, we pass a 0-length Array of\r
- * the correct type into the API call. This way we <i>know</i>\r
- * that the Array returned is of exactly the correct length.\r
- * \r
- * @return this collection as an Array\r
- */\r
- public java.lang.Object[] getObjRef(\r
- ) {\r
- java.lang.Object[] array = new java.lang.Object[0];\r
- return (java.lang.Object[]) this._objRef.toArray(array);\r
- }\r
-\r
- /**\r
- * Method getObjRefAsReference.Returns a reference to\r
- * '_objRef'. No type checking is performed on any\r
- * modifications to the Vector.\r
- * \r
- * @return a reference to the Vector backing this class\r
- */\r
- public java.util.Vector getObjRefAsReference(\r
- ) {\r
- return this._objRef;\r
- }\r
-\r
- /**\r
- * Method getObjRefCount.\r
- * \r
- * @return the size of this collection\r
- */\r
- public int getObjRefCount(\r
- ) {\r
- return this._objRef.size();\r
- }\r
-\r
- /**\r
- * Overrides the java.lang.Object.hashCode method.\r
- * <p>\r
- * The following steps came from <b>Effective Java Programming\r
- * Language Guide</b> by Joshua Bloch, Chapter 3\r
- * \r
- * @return a hash code value for the object.\r
- */\r
- public int hashCode(\r
- ) {\r
- int result = super.hashCode();\r
- \r
- long tmp;\r
- if (_name != null\r
- && !org.castor.util.CycleBreaker.startingToCycle(_name)) {\r
- result = 37 * result + _name.hashCode();\r
- org.castor.util.CycleBreaker.releaseCycleHandle(_name);\r
- }\r
- if (_objRef != null\r
- && !org.castor.util.CycleBreaker.startingToCycle(_objRef)) {\r
- result = 37 * result + _objRef.hashCode();\r
- org.castor.util.CycleBreaker.releaseCycleHandle(_objRef);\r
- }\r
- \r
- return result;\r
- }\r
-\r
- /**\r
- * Method isValid.\r
- * \r
- * @return true if this object is valid according to the schema\r
- */\r
- public boolean isValid(\r
- ) {\r
- try {\r
- validate();\r
- } catch (org.exolab.castor.xml.ValidationException vex) {\r
+ if (this._objRef != null) {\r
+ if (temp._objRef == null)\r
+ return false;\r
+ if (this._objRef != temp._objRef) {\r
+ thcycle = org.castor.util.CycleBreaker.startingToCycle(this._objRef);\r
+ tmcycle = org.castor.util.CycleBreaker.startingToCycle(temp._objRef);\r
+ if (thcycle != tmcycle) {\r
+ if (!thcycle) {\r
+ org.castor.util.CycleBreaker.releaseCycleHandle(this._objRef);\r
+ }\r
+ ;\r
+ if (!tmcycle) {\r
+ org.castor.util.CycleBreaker.releaseCycleHandle(temp._objRef);\r
+ }\r
+ ;\r