* Java 1.1 compatible. *
* * @see * ArrayLib2 * * @version * 2003-04-07 * @since * 2001-04-06 * @author * David Wallace Croft*/ public class Util{ /********************************************************************* * Appends an integer to an integer array. * * @param intArray * * May be null. *********************************************************************/ public static int [ ] append ( int [ ] intArray, int i ) ////////////////////////////////////////////////////////////////////// { if ( intArray == null ) { return new int [ ] { i }; } int intArrayLength = intArray.length; int [ ] newIntArray = new int [ intArrayLength + 1 ]; System.arraycopy ( intArray, 0, newIntArray, 0, intArrayLength ); newIntArray [ intArrayLength ] = i; return newIntArray; } }