## org.apache.myfaces.util
Class ArrayUtils

    java.lang.Object
      org.apache.myfaces.util.ArrayUtils

public class ArrayUtils
extends java.lang.Object

Utility class for managing arrays

Version:
  $Revision: 169655 $ $Date: 2005-05-11 12:45:06 -0400 (Wed, 11 May 2005) $
Author:
  Anton Koinov (latest modification by $Author: grantsmith $)

Field Summary
`static java.lang.Object[]` `EMPTY_OBJECT_ARRAY`
`static java.lang.String[]` `EMPTY_STRING_ARRAY`

Constructor Summary
`protected` `ArrayUtils()`

Method Summary
`static java.lang.Class` `commonClass(java.lang.Class c1, java.lang.Class c2)`
`static java.lang.Object` `concat(java.lang.Object[] arrs)` Concatenates arrays into one.
`static java.lang.Object` `concat(java.lang.Object toArray, int totalLen, java.lang.Object[] arrs)`
`static java.lang.Object` `concat(java.lang.Object arr1, java.lang.Object arr2)` Concatenates two arrays into one.
`static java.lang.Object` `concat(java.lang.Object arr1, java.lang.Object arr2, java.lang.Object arr3)`
`static java.lang.Object` `concat(java.lang.Object arr1, java.lang.Object arr2, java.lang.Object arr3, java.lang.Object arr4)`
`static java.lang.Object` `concat(java.lang.Object arr1, java.lang.Object arr2, java.lang.Object arr3, java.lang.Object arr4, java.lang.Object arr5)`
`static java.lang.Object` `concatSameType(java.lang.Object toArray, java.lang.Object[] arrs)`
`static boolean` `contains(java.lang.Object[] array, java.lang.Object value)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EMPTY_OBJECT_ARRAY

    public static final java.lang.Object[] EMPTY_OBJECT_ARRAY

### EMPTY_STRING_ARRAY

    public static final java.lang.String[] EMPTY_STRING_ARRAY

Constructor Detail

### ArrayUtils

    protected ArrayUtils()

Method Detail

### commonClass

    public static java.lang.Class commonClass(java.lang.Class c1,
                                              java.lang.Class c2)

### concat

    public static java.lang.Object concat(java.lang.Object arr1,
                                          java.lang.Object arr2)

  Concatenates two arrays into one. If arr1 is null or empty, returns arr2. If arr2 is null or empty, returns arr1. May return null if both arrays are null, or one is empty and the other null.
  The concatenated array has componentType which is compatible with both input arrays (or Object[])

  Parameters:
    `arr1` - input array
    `arr2` - input array
  Returns:
    Object the concatenated array, elements of arr1 first

### concat

    public static java.lang.Object concat(java.lang.Object[] arrs)

  Concatenates arrays into one. Any null or empty arrays are ignored. If all arrays are null or empty, returns null. Elements will be ordered in the order in which the arrays are supplied.

  Parameters:
    `arrs` - array of arrays
  Returns:
    the concatenated array

### concat

    public static java.lang.Object concat(java.lang.Object toArray,
                                          int totalLen,
                                          java.lang.Object[] arrs)

### concat

    public static java.lang.Object concat(java.lang.Object arr1,
                                          java.lang.Object arr2,
                                          java.lang.Object arr3)

### concat

    public static java.lang.Object concat(java.lang.Object arr1,
                                          java.lang.Object arr2,
                                          java.lang.Object arr3,
                                          java.lang.Object arr4)

### concat

    public static java.lang.Object concat(java.lang.Object arr1,
                                          java.lang.Object arr2,
                                          java.lang.Object arr3,
                                          java.lang.Object arr4,
                                          java.lang.Object arr5)

### concatSameType

    public static java.lang.Object concatSameType(java.lang.Object toArray,
                                                  java.lang.Object[] arrs)

### contains

    public static boolean contains(java.lang.Object[] array,
                                   java.lang.Object value)