|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dyuproject.util.ArrayUtil
public final class ArrayUtil
Constructor Summary | |
---|---|
ArrayUtil()
|
Method Summary | ||
---|---|---|
static
|
append(T[] oldArray,
T toAppend)
Copies the elements of the oldArray to a new array with extra space to
append the given element toAppend . |
|
static
|
append(T[] oldArray,
T[] toAppend)
Copies the elements of the oldArray to a new array with extra space to
append the given array toAppend . |
|
static
|
append(T[] oldArray,
T[] toAppend1,
T toAppend2)
Copies the elements of the oldArray to a new array with extra space to
append the given array toAppend1 and the element toAppend2 . |
|
static
|
append(T[] oldArray,
T[] toAppend1,
T[] toAppend2)
Copies the elements of the oldArray to a new array with extra space to
append the given array toAppend1 and the array toAppend2 . |
|
static
|
append(T[] oldArray,
T toAppend1,
T[] toAppend2)
Copies the elements of the oldArray to a new array with extra space to
append the given element toAppend1 and the array toAppend2 . |
|
static
|
remove(T[] oldArray,
int idx)
Returns a copy of the old array oldArray but with the element at the
give index idx removed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArrayUtil()
Method Detail |
---|
public static <T> T[] append(T[] oldArray, T toAppend)
oldArray
to a new array with extra space to
append the given element toAppend
.
public static <T> T[] append(T[] oldArray, T toAppend1, T[] toAppend2)
oldArray
to a new array with extra space to
append the given element toAppend1
and the array toAppend2
.
public static <T> T[] append(T[] oldArray, T[] toAppend)
oldArray
to a new array with extra space to
append the given array toAppend
.
public static <T> T[] append(T[] oldArray, T[] toAppend1, T toAppend2)
oldArray
to a new array with extra space to
append the given array toAppend1
and the element toAppend2
.
public static <T> T[] append(T[] oldArray, T[] toAppend1, T[] toAppend2)
oldArray
to a new array with extra space to
append the given array toAppend1
and the array toAppend2
.
public static <T> T[] remove(T[] oldArray, int idx)
oldArray
but with the element at the
give index idx
removed.
{@link
- IllegalArgumentException} if the array index is out of bounds.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |