diff --git a/src/java/com/samskivert/util/ArrayUtil.java b/src/java/com/samskivert/util/ArrayUtil.java index ff7028e6..171453b9 100644 --- a/src/java/com/samskivert/util/ArrayUtil.java +++ b/src/java/com/samskivert/util/ArrayUtil.java @@ -804,6 +804,18 @@ public class ArrayUtil return insert(values, value, values.length); } + /** + * Creates a new array that contains the contents of the first parameter + * array followed by those of the second. + */ + public static int[] concatenate (int[] v1, int[] v2) + { + int[] values = new int[v1.length + v2.length]; + System.arraycopy(v1, 0, values, 0, v1.length); + System.arraycopy(v2, 0, values, v1.length, v2.length); + return values; + } + /** * Creates a new array that contains the contents of the first parameter * array followed by those of the second.