|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.databene.commons.ArrayUtil
public final class ArrayUtil
Provides array-related operations.
Created: 09.06.2006 21:31:49
| Constructor Summary | |
|---|---|
ArrayUtil()
|
|
| Method Summary | ||
|---|---|---|
static
|
append(T[] array,
T value)
|
|
static java.lang.Class |
arrayType(java.lang.Class componentType)
|
|
static
|
buildArrayOfType(java.lang.Class<T> componentType,
T... values)
|
|
static
|
commonElements(java.lang.Class<T> componentType,
T[]... sources)
|
|
static
|
commonElements(T[]... sources)
|
|
static
|
componentType(T[] array)
|
|
static
|
contains(T[] array,
T element)
Tells if an array contains a specific element |
|
static
|
copyOfRange(java.lang.Object[] array,
int offset,
int length,
java.lang.Class<T> componentType)
|
|
static
|
copyOfRange(T[] array,
int offset,
int length)
|
|
static
|
endsWithSequence(T[] candidates,
T[] searched)
Tells if an array ends with a specified sub array |
|
static
|
equalsIgnoreOrder(T[] a1,
T[] a2)
Tells if two arrays have the same content, independent of the ordering |
|
static
|
indexOf(T searchedItem,
T[] array)
Tells the first index under which an item is found in an array. |
|
static boolean |
isEmpty(java.lang.Object[] values)
|
|
static
|
iterator(T[] array)
|
|
static
|
lastElement(T[] array)
|
|
static
|
newInstance(java.lang.Class<T> componentType,
int length)
|
|
static
|
remove(T[] array,
int indexToRemove)
|
|
static char[] |
revert(char[] array)
|
|
static
|
revert(T[] array)
|
|
static
|
toArray(T... values)
|
|
static char[] |
toCharArray(char... values)
|
|
static int[] |
toIntArray(int... values)
|
|
| 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[] copyOfRange(T[] array,
int offset,
int length)
public static <T> java.lang.Class<T> componentType(T[] array)
public static <T> T[] copyOfRange(java.lang.Object[] array,
int offset,
int length,
java.lang.Class<T> componentType)
public static <T> T[] remove(T[] array,
int indexToRemove)
public static <T> boolean contains(T[] array,
T element)
element - the element to searcharray - the array to scan
public static <T> boolean endsWithSequence(T[] candidates,
T[] searched)
candidates - the array to scansearched - the sub array that is searched
public static <T> T[] commonElements(T[]... sources)
public static <T> T[] commonElements(java.lang.Class<T> componentType,
T[]... sources)
public static <T> boolean equalsIgnoreOrder(T[] a1,
T[] a2)
a1 - the first array to comparea2 - the first array to compare
public static <T> int indexOf(T searchedItem,
T[] array)
searchedItem - array -
public static <T> T[] toArray(T... values)
public static int[] toIntArray(int... values)
public static char[] toCharArray(char... values)
public static <T> T[] buildArrayOfType(java.lang.Class<T> componentType,
T... values)
public static <T> java.util.Iterator<T> iterator(T[] array)
public static <T> T[] revert(T[] array)
public static char[] revert(char[] array)
public static java.lang.Class arrayType(java.lang.Class componentType)
public static <T> T[] newInstance(java.lang.Class<T> componentType,
int length)
public static <T> T[] append(T[] array,
T value)
public static boolean isEmpty(java.lang.Object[] values)
public static <T> T lastElement(T[] array)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||