[webbeans-commits] Webbeans SVN: r3526 - ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sun Aug 16 12:15:56 EDT 2009
Author: pete.muir at jboss.org
Date: 2009-08-16 12:15:56 -0400 (Sun, 16 Aug 2009)
New Revision: 3526
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/Arrays2.java
Log:
Add util method
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/Arrays2.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/Arrays2.java 2009-08-16 16:15:27 UTC (rev 3525)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/collections/Arrays2.java 2009-08-16 16:15:56 UTC (rev 3526)
@@ -17,6 +17,8 @@
package org.jboss.webbeans.util.collections;
import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
/**
* @author pmuir
@@ -37,4 +39,14 @@
return containsAll(array, values) && array.length == values.length;
}
+ public static <T> Set<T> asSet(T... types)
+ {
+ Set<T> result = new HashSet<T>();
+ for (T type : types)
+ {
+ result.add(type);
+ }
+ return result;
+ }
+
}
More information about the weld-commits
mailing list