|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ourgrid.common.util.ArrayUtil
public class ArrayUtil
This is a auxiliar class that incloses many util functionalities related to the Array data structure.
Constructor Summary | |
---|---|
ArrayUtil()
|
Method Summary | |
---|---|
static void |
concat(java.lang.Object[] array1,
java.lang.Object[] array2,
java.lang.Object[] mergedArray)
Puts all the elements from two source arrays at another destiny one. |
static int |
find(java.lang.Object element,
java.lang.Object[] array1)
Search for a object element into a array. |
static void |
invert(java.lang.Object[] objArray)
This method inverts the order of the elements in objArray . |
static void |
removeFirst(java.lang.Object[] objArray,
java.lang.Object[] resultArray)
This method removes the fisrt element of an array, if the array contains only one element, it returns null. |
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 void removeFirst(java.lang.Object[] objArray, java.lang.Object[] resultArray)
objArray
- The source array. Their first element will be removed.resultArray
- Is the source array without the first element, or null
if there is no more elements in the array.public static void invert(java.lang.Object[] objArray)
objArray
.
objArray
- the array that will have its elements inverted.public static void concat(java.lang.Object[] array1, java.lang.Object[] array2, java.lang.Object[] mergedArray)
array1
- the first array source.array2
- the second array source.mergedArray
- the destiny array.public static int find(java.lang.Object element, java.lang.Object[] array1)
element
- the element to searcharray1
- the array where to search.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |