public class ArrayUtil extends Object implements Cloneable, Serializable
| Constructor and Description |
|---|
ArrayUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T[] |
addToArray(T[] array,
T item,
Class<?> type)
Add element to an array
|
static <E> List<E> |
asMutableList(E[] array) |
static <T> T[] |
prependToArray(T item,
T[] array,
Class<?> type)
Add element to the start of an array
|
static <T> T[] |
removeFromArray(T[] array,
Object item) |
static <T> T[] |
removeNulls(T[] array) |
public static <T> T[] removeFromArray(T[] array,
Object item)
public static <T> T[] addToArray(T[] array,
T item,
Class<?> type)
array - The array to add to (or null)item - The item to addtype - The type of the array (in case of null array)public static <T> T[] prependToArray(T item,
T[] array,
Class<?> type)
array - The array to add to (or null)item - The item to addtype - The type of the array (in case of null array)public static <E> List<E> asMutableList(E[] array)
array - Any array of objectarray.public static <T> T[] removeNulls(T[] array)
Copyright © 1995-2015 Webtide. All Rights Reserved.