From 1a8da5bf2de402945460306bbfab29e370964219 Mon Sep 17 00:00:00 2001 From: mdb Date: Fri, 21 Jul 2006 18:52:05 +0000 Subject: [PATCH] Added append(float[],float). git-svn-id: https://samskivert.googlecode.com/svn/trunk@1878 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/java/com/samskivert/util/ArrayUtil.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/java/com/samskivert/util/ArrayUtil.java b/src/java/com/samskivert/util/ArrayUtil.java index f8d10f20..c525d9b2 100644 --- a/src/java/com/samskivert/util/ArrayUtil.java +++ b/src/java/com/samskivert/util/ArrayUtil.java @@ -755,6 +755,18 @@ public class ArrayUtil return nvalues; } + /** + * Creates a new array one larger than the supplied array and with the + * specified value inserted into the last slot. + */ + public static float[] append (float[] values, float value) + { + float[] nvalues = new float[values.length+1]; + System.arraycopy(values, 0, nvalues, 0, values.length); + nvalues[values.length] = value; + return nvalues; + } + /** * Creates a new array one larger than the supplied array and with the * specified value inserted into the last slot. The type of the values