copyInto() now returns its argument
[org.ibex.util.git] / src / org / ibex / util / Vec.java
index ffe7cfd..d3fe00e 100644 (file)
@@ -86,9 +86,10 @@ public final class Vec implements Serializable {
         size = newSize;
     }
 
-    public void copyInto(Object[] out) {
+    public Object[] copyInto(Object[] out) {
         for(int i=0; i<size; i++)
             out[i] = store[i];
+        return out;
     }
 
     public void fromArray(Object[] in) {
@@ -288,9 +289,10 @@ public final class Vec implements Serializable {
             size = newSize;
         }
 
-        public void copyInto(int[] out) {
+        public int[] copyInto(int[] out) {
             for(int i=0; i<size; i++)
                 out[i] = store[i];
+            return out;
         }
 
         public void fromArray(int[] in) {