* given is outside the bounds of the collection\r
*/\r
public void addSeq(\r
- final int vSeq)\r
+ final java.lang.String vSeq)\r
throws java.lang.IndexOutOfBoundsException {\r
- this._seqList.addElement(new java.lang.Integer(vSeq));\r
+ this._seqList.addElement(vSeq);\r
}\r
\r
/**\r
*/\r
public void addSeq(\r
final int index,\r
- final int vSeq)\r
+ final java.lang.String vSeq)\r
throws java.lang.IndexOutOfBoundsException {\r
- this._seqList.add(index, new java.lang.Integer(vSeq));\r
+ this._seqList.add(index, vSeq);\r
}\r
\r
/**\r
/**\r
* Method enumerateSeq.\r
* \r
- * @return an Enumeration over all int elements\r
+ * @return an Enumeration over all java.lang.String elements\r
*/\r
public java.util.Enumeration enumerateSeq(\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 int at the given index\r
+ * @return the value of the java.lang.String at the given index\r
*/\r
- public int getSeq(\r
+ public java.lang.String getSeq(\r
final int index)\r
throws java.lang.IndexOutOfBoundsException {\r
// check bounds for index\r
throw new IndexOutOfBoundsException("getSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");\r
}\r
\r
- return ((java.lang.Integer) _seqList.get(index)).intValue();\r
+ return (java.lang.String) _seqList.get(index);\r
}\r
\r
/**\r
* Method getSeq.Returns the contents of the collection in an\r
- * Array. \r
+ * Array. <p>Note: Just in case the collection contents are\r
+ * changing in another thread, we pass a 0-length Array of the\r
+ * 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 int[] getSeq(\r
+ public java.lang.String[] getSeq(\r
) {\r
- int size = this._seqList.size();\r
- int[] array = new int[size];\r
- java.util.Iterator iter = _seqList.iterator();\r
- for (int index = 0; index < size; index++) {\r
- array[index] = ((java.lang.Integer) iter.next()).intValue();\r
- }\r
- return array;\r
+ java.lang.String[] array = new java.lang.String[0];\r
+ return (java.lang.String[]) this._seqList.toArray(array);\r
}\r
\r
/**\r
* @return true if the object was removed from the collection.\r
*/\r
public boolean removeSeq(\r
- final int vSeq) {\r
- boolean removed = _seqList.remove(new java.lang.Integer(vSeq));\r
+ final java.lang.String vSeq) {\r
+ boolean removed = _seqList.remove(vSeq);\r
return removed;\r
}\r
\r
* @param index\r
* @return the element removed from the collection\r
*/\r
- public int removeSeqAt(\r
+ public java.lang.String removeSeqAt(\r
final int index) {\r
java.lang.Object obj = this._seqList.remove(index);\r
- return ((java.lang.Integer) obj).intValue();\r
+ return (java.lang.String) obj;\r
}\r
\r
/**\r
*/\r
public void setSeq(\r
final int index,\r
- final int vSeq)\r
+ final java.lang.String vSeq)\r
throws java.lang.IndexOutOfBoundsException {\r
// check bounds for index\r
if (index < 0 || index >= this._seqList.size()) {\r
throw new IndexOutOfBoundsException("setSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");\r
}\r
\r
- this._seqList.set(index, new java.lang.Integer(vSeq));\r
+ this._seqList.set(index, vSeq);\r
}\r
\r
/**\r
* @param vSeqArray\r
*/\r
public void setSeq(\r
- final int[] vSeqArray) {\r
+ final java.lang.String[] vSeqArray) {\r
//-- copy array\r
_seqList.clear();\r
\r
for (int i = 0; i < vSeqArray.length; i++) {\r
- this._seqList.add(new java.lang.Integer(vSeqArray[i]));\r
+ this._seqList.add(vSeqArray[i]);\r
}\r
}\r
\r