|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.larsan.urd.util.ArrayUtils
Some static array helper methods.
| Constructor Summary | |
ArrayUtils()
|
|
| Method Summary | |
static java.util.Iterator |
getIterator(java.lang.Object[] array)
Wrap an object array on an iterator. |
static double[] |
grow(double[] original,
int increase)
Grow an double array with a number of elements. |
static int[] |
grow(int[] original,
int increase)
Grow an int array with a number of elements. |
static long[] |
grow(long[] original,
int increase)
Grow an long array with a number of elements. |
static java.lang.Object |
grow(java.lang.Object[] original,
int increase)
Grow an object array with a number of elements. |
static double[] |
shrink(double[] original,
int descrease)
Shrink an array by a number of elements. |
static int[] |
shrink(int[] original,
int descrease)
Shrink an array by a number of elements. |
static long[] |
shrink(long[] original,
int descrease)
Shrink an array by a number of elements. |
static java.lang.Object |
shrink(java.lang.Object[] original,
int descrease)
Shrink an array by a number of elements. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ArrayUtils()
| Method Detail |
public static java.lang.Object grow(java.lang.Object[] original,
int increase)
original - Original array to growincrease - Size to increase original array with
public static int[] grow(int[] original,
int increase)
original - Original array to growincrease - Size to increase original array with
public static long[] grow(long[] original,
int increase)
original - Original array to growincrease - Size to increase original array with
public static double[] grow(double[] original,
int increase)
original - Original array to growincrease - Size to increase original array with
public static java.lang.Object shrink(java.lang.Object[] original,
int descrease)
throws java.lang.ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException will be thrown.
original - Original array to shrink
java.lang.ArrayIndexOutOfBoundsException - If the array length becomes less than zero
public static int[] shrink(int[] original,
int descrease)
throws java.lang.ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException will be thrown.
original - Original array to shrink
java.lang.ArrayIndexOutOfBoundsException - If the array length becomes less than zero
public static long[] shrink(long[] original,
int descrease)
throws java.lang.ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException will be thrown.
original - Original array to shrink
java.lang.ArrayIndexOutOfBoundsException - If the array length becomes less than zero
public static double[] shrink(double[] original,
int descrease)
throws java.lang.ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException will be thrown.
original - Original array to shrink
java.lang.ArrayIndexOutOfBoundsException - If the array length becomes less than zeropublic static java.util.Iterator getIterator(java.lang.Object[] array)
array - Array to wrap
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||