org.jboss.ejb3.util
Class CollectionHelper

java.lang.Object
  extended by org.jboss.ejb3.util.CollectionHelper

public class CollectionHelper
extends java.lang.Object

Provide helpful functions for Collection objects.


Constructor Summary
CollectionHelper()
           
 
Method Summary
static
<E> boolean
addAllIfSet(java.util.Collection<E> target, java.util.Collection<? extends E> c)
          Adds all of the elements in the specified collection to the target collection if a collection is specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionHelper

public CollectionHelper()
Method Detail

addAllIfSet

public static <E> boolean addAllIfSet(java.util.Collection<E> target,
                                      java.util.Collection<? extends E> c)
Adds all of the elements in the specified collection to the target collection if a collection is specified.

Type Parameters:
E -
Parameters:
target -
c - collection containing elements to be added to this collection, may be null
Returns:
true if this collection changed as a result of the call