Author: doogie
Date: Wed Oct 17 13:58:05 2007
New Revision: 585697
URL:
http://svn.apache.org/viewvc?rev=585697&view=revLog:
Add UtilMisc.toSetArray, to mirror toListArray.
Modified:
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java
Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java?rev=585697&r1=585696&r2=585697&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java Wed Oct 17 13:58:05 2007
@@ -354,6 +354,17 @@
}
}
+ public static Set toSetArray(Object[] data) {
+ if (data == null) {
+ return null;
+ }
+ Set set = FastSet.newInstance();
+ for (int i = 0; i < data.length; i++) {
+ set.add(data[i]);
+ }
+ return set;
+ }
+
/**
* Create a list from passed objX parameters
* @return The resulting List