Added append(float[],float).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1878 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -755,6 +755,18 @@ public class ArrayUtil
|
|||||||
return nvalues;
|
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
|
* 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
|
* specified value inserted into the last slot. The type of the values
|
||||||
|
|||||||
Reference in New Issue
Block a user