Nuxeo Enterprise Platform 5.4

org.nuxeo.common.utils
Class ArrayUtils

java.lang.Object
  extended by org.nuxeo.common.utils.ArrayUtils

public final class ArrayUtils
extends java.lang.Object

Array utils.

Author:
Julien Anguenot

Method Summary
static
<T> T[]
arrayMerge(T[]... arrays)
          Merges any number of Array.
static
<T> T[]
intersect(T[]... arrays)
          Method for intersecting arrays elements.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

arrayMerge

public static <T> T[] arrayMerge(T[]... arrays)
Merges any number of Array.

Comes from : http://forum.java.sun.com/thread.jspa?threadID=202127&messageID=676603

Parameters:
arrays - several arrays
Returns:
a merged array

intersect

public static <T> T[] intersect(T[]... arrays)
Method for intersecting arrays elements. Copy of the first array and remove progressively elements if not found in the other arrays.

This method will keep the initial order of elements (as found in the first array).


Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.