Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.myfaces.shared_orchestra.util
Class ArrayUtils

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

    public class ArrayUtils

extends Object

Utility class for managing arrays

Version:
  $Revision: 472630 $ $Date: 2006-11-08 15:40:03 -0500 (Wed, 08 Nov 2006) $
Author:
  Anton Koinov (latest modification by $Author: grantsmith $)

Field Summary
`static Object[]` | `EMPTY_OBJECT_ARRAY`
`static String[]` | `EMPTY_STRING_ARRAY`

Constructor Summary
`protected` | `ArrayUtils()`

Method Summary
`static Class` | `commonClass(Class c1, Class c2)`
`static Object` | `concat(Object[] arrs)` Concatenates arrays into one.
`static Object` | `concat(Object toArray, int totalLen, Object[] arrs)`
`static Object` | `concat(Object arr1, Object arr2)` Concatenates two arrays into one.
`static Object` | `concat(Object arr1, Object arr2, Object arr3)`
`static Object` | `concat(Object arr1, Object arr2, Object arr3, Object arr4)`
`static Object` | `concat(Object arr1, Object arr2, Object arr3, Object arr4, Object arr5)`
`static Object` | `concatSameType(Object toArray, Object[] arrs)`
`static boolean` | `contains(Object[] array, 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 Object[] EMPTY_OBJECT_ARRAY

### EMPTY_STRING_ARRAY

    public static final String[] EMPTY_STRING_ARRAY

Constructor Detail

### ArrayUtils

    protected ArrayUtils()

Method Detail

### commonClass

    public static Class commonClass(Class c1,
                                    Class c2)

### concat

    public static Object concat(Object arr1,
                                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 Object concat(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 Object concat(Object toArray,
                                int totalLen,
                                Object[] arrs)

### concat

    public static Object concat(Object arr1,
                                Object arr2,
                                Object arr3)

### concat

    public static Object concat(Object arr1,
                                Object arr2,
                                Object arr3,
                                Object arr4)

### concat

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

### concatSameType

    public static Object concatSameType(Object toArray,
                                        Object[] arrs)

### contains

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 The Apache Software Foundation. All Rights Reserved.