2003/04/24 14:33:29
[org.ibex.core.git] / src / org / xwt / util / Vec.java
index 7b55023..d4b45f7 100644 (file)
@@ -71,6 +71,12 @@ public class Vec implements Serializable {
             out[i] = store[i];
     }
 
+    public void fromArray(Object[] in) {
+        setSize(in.length);
+        for(int i=0; i<size; i++)
+            store[i] = in[i];
+    }
+
     public void removeElementAt(int i) {
         if (i >= size || i < 0) throw new RuntimeException("tried to remove an element outside the vector's limits");
         for(int j=i; j<size - 1; j++)