org.jboss.ejb3.util
Class CollectionHelper

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

public class CollectionHelper
extends Object

Provide helpful functions for Collection objects.

Version:
$Revision: $
Author:
Carlo de Wolf

Constructor Summary
CollectionHelper()
           
 
Method Summary
static
<E> boolean
addAllIfSet(Collection<E> target, 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(Collection<E> target,
                                      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


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.